Run
<html> <body> <script> function EvenOdd() { var a=prompt("enter a number:"); if(a%2==0) document.write(a+" is Even number"); else document.write(a+" is odd number"); } </script> <form> <input type="button" value="EvenOdd" onclick="EvenOdd();"> </form> </body> </html>