|
Place the script wherever you want the message/input to appear.
<Html>
<Head>
<title>Taking and pasting input to your web page</title>
<script language=javascript>
<!-- Hide script from old browsers
var Name = prompt ("Please
enter your name", "");
if ((Name == "") || (Name == null))
{ Name = "Voyager"; }
document.writeln
("<center>Welcome to my web site " + Name + "
</center>");
// end hiding script from old
browsers -->
</script>
<Body bgcolor=white></body>
</html>
Click here
to see it in action.
|