Assignment 11: A Possible Answer


     It's a little long, but you can easily understand it.

<SCRIPT LANGUAGE="javascript">
/*This script is intended to take information from the user
and place it upon the page*/
var NA = navigator.appName
var PT = document.title
var user_fname = prompt("Write your first name in the box below","Write it here")
var user_lname = prompt("Write your last name in the box below","Write it here")
document.write("Hello " + user_fname + " " + user_lname + ". Welcome to my page!")
document.write(" I see you are using " + NA+ ".")
document.write(" Thanks for stopping by " +PT+ ".")


Gives you this:

     Notice the two variables were created right off. Then the two prompt variables were written. Finally, the text that will be written to the page is done in three document.write statements.

     You can see how the variable NA and PT were called for by only those two letters.


Did You Get It?


Back to the Index Page