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

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

<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>")

Comments or Responses

Login to post response