|
<SCRIPT>
var name = prompt("Enter
Your Name:", "Frank");
// if the person cancelled the prompt
make "Frank" the default Name
if (!name) name = "Frank";
// the \n means new line \t means tab -
these escape characters work within the alert msg
// "Greetings " + name - concatenating a string with a
variable
alert("Greetings " + name
+ ". \n\nWelcome\nto the\n" + navigator.appName
+ " Browser!");
</SCRIPT>
<BODY>
<SCRIPT>
document.write('<CENTER>');
document.write('<IMG
SRC="welcome.gif">');
document.write("<H3>Greetings,
" + name + ".");
document.write(
"<p>Welcome to the " + navigator.appName
+ " Browser!</p></H3>");
document.write('</CENTER>');
</SCRIPT> |