#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...
//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