JSFiddle - React, Tailwind, and code Playground
HTML
<html>
<head>
<title>Quiz</title>
</head>
<body>
<form action="#" id="sirala">
<table border="0">
<tr><td><b>Sayı 1</b><input type="text" id="s1"></td></tr>
<tr><td><b>Sayı 2</b><input type="text" id="s2"></td></tr>
<tr><td><b>Sayı 3</b><input type="text" id="s3"></td></tr>
<tr><td>><button type="button" onclick="Sirala()">Sırala</button></td></tr>
</table>
</form>
</body>
<script>
function Sirala(){
var x=parseInt(document.getElementById("s1").value);
var y=parseInt(document.getElementById("s2").value);
var z=parseInt(document.getElementById("s3").value);
if (x>y && x>z)
{
if (y>z)
{
console.log(x + ", " + y + ", " +z);
}
else
{
console.log(x + ", " + z + ", " +y);
}
}
else if (y>x && y >z)
{
if (x>z)
{
console.log(y + ", " + x + ", " +z);
}
else
{
console.log(y + ", " + z + ", " +x);
}
}
else if (z>x && z>y)
{
if (x>y)
{
console.log(z + ", " + x + ", " +y);
}
else
{
console.log(z + ", " + y + ", " +x);
}
}
}
</script>
</html>