Ask the User name and Tell them Welcome on Page Load Using Java Script

Chikul
Posted by Chikul under JavaScript category on | Views : 3832
This will ask the user for his/her name, then tell them WELCOME.
Place this script in the BODY tag.

<body>
<form id="form1" runat="server">
<script language="JavaScript" type="text/javascript">
{
var name = prompt ('Your name','');
var color = prompt ('Color name','');
document.write("<CENTER><FONT FACE=VERDANA COLOR="+ color +" SIZE=4>Welcome To JavaScript "+ name +".</FONT><HR></CENTER><P>")
}
</script>
</form>
</body>

Comments or Responses

Login to post response