I want to develope a decimal to binary converter..
the js code is not working..plz help

<!DOCTYPE html>
<html lang="en">
<head>
<title>Test Status</title>
<script>
function myfunction() {
var x = document.getElementById("decimal").value;
var y = "";
while (x > 0) {
remainder = x % 2;
qoutient = Math.floor(x/2);
y = remainder + y;
x = qoutient;
}
document.getElementById("display").innerHTML = y;
}
</script>
</head>
<body>
<center>
<form id=convert onsubmit="myfunction()">
<input type="text" id=decimal>
<input type=submit value=Convert>

<p id="display">value</p>
</form>
</center>




</body>
</html>