Click the following button, you will be redirected to home page. <html> <head> <script type="text/javascript"> <!-- function Redirect() { window.location="http://www.google.com"; } //--> </script> </head> <body> <p>Click the following button, you will be redirected to home page.</p> <form> <input type="button" value="Redirect Me" onclick="Redirect();" /> </form> </body> </html>
<html> <head> <script type="text/javascript"> <!-- function getValue(){ var retVal = prompt("Enter your name : ", "your name here"); document.write("You have entered : " + retVal); } //--> </script> </head> <body> <p>Click the following button to see the result: </p> <form> <input type="button" value="Click Me" onclick="getValue();" /> </form> </body> ...
Comments
Post a Comment