to accept two positive or negative numbers and check whether they are equal or not in javascript
Answers
Answered by
2
What is JavaScript please tell me
Answered by
5
Program to accept two positive or negative numbers and check whether they are equal or not.
function compare()
{ var x, y;
x = Number(document.getElementById("first").value);
y = Number(document.getElementById("second").value);
if ( x == y)
{ document.write("True"); }
else
{ document.write("False"); }
}
</script>
</head>
<body>
Enter the First number : <input id="first">
Enter the Second number: <input id="second">
</body>
</html>
Similar questions
Computer Science,
7 months ago
Math,
7 months ago
English,
1 year ago
Computer Science,
1 year ago
Chemistry,
1 year ago