Mega Code Archive

 
Categories / JavaScript DHTML / Data Type
 

Read a number and compare its value

<html> <head>     <title>An If Example</title> </head> <body> <script type = "text/javascript" > var inputNum = prompt("Please enter a number below 100:"); if (inputNum > 99) {     document.write("That number, " + inputNum + ", is not below 100."); } </script> </body> </html>