Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <html xmlns = "http://www.w3.org/1999/xhtml">
- <head>
- <title>Using Prompt and Alert Boxes</title>
- <script type = "text/javascript">
- <!--
- var name; // string entered by the user
- // read the name from the prompt box as a string
- name = window.prompt( "Please enter your name", "GalAnt" );
- document.writeln( "<h1>Hello " + name +
- ", welcome to JavaScript programming!</h1>" );
- // -->
- </script>
- </head>
- <body>
- <p>Click Refresh (or Reload) to run this script again.</p>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement