Welcome visitor by asking name

How do I know your name? I don't. This is a great Javascript to put on your page if you are trying to make your visitors feel at home. What is the down side to this? Well,

#1 - You must have the place where you put the name in a script.
(You can use the Document Write In to remedy this)
#2 - Your script must be enclosed in double quotes.
[Ex. This will not work - ('Hi! "+name+" ') ; this will - ("Hi! "+name+" ")] The source...

<SCRIPT LANGUAGE="Javascript">

//from Tawhidur Rahman Dear

name=window.prompt("Please tell me your name.","nobody");

document.write("<H1 align=center>Hi! "+name+".</H1>")


1. To remove all formatting, copy/paste the code in Notepad first, then into webpage
2. Find <head> and  </head> tag in webpage code, paste between them
3. Some browsers may not support this code