Free Web Hosting PHP/mySQL
GlobalWeb.com.ru Forum Index GlobalWeb.com.ru
Free Web Hosting :: Commercial Web Hosting :: PHP/mySQL :: CGI/Perl
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

JavaScript Prompt

 
Post new topic   Reply to topic    GlobalWeb.com.ru Forum Index -> Javascript
Author Message
G-Bomb



Joined: 29 Feb 2004
Posts: 73

PostPosted: Thu Mar 04, 2004 8:28 pm    Post subject: JavaScript Prompt Reply with quote

Using the prompt command, you can get information from the user to use however you wish.

Try this sample code:

Code:
<HTML>
<HEAD>
<SCRIPT LANGUAGE="JavaScript"><!--

var name=prompt("Welcome!  What is your name?","Enter your name here.");

// --></SCRIPT>
</HEAD>

<BODY>
<SCRIPT LANGUAGE="JavaScript"><!--

document.write("This, " + name + ", is how to use the prompt command.");

// --></SCRIPT>
</BODY>
</HTML>


This will bring up a prompt asking for you to enter your name. That is then saved in a variable and printed on the screen.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    GlobalWeb.com.ru Forum Index -> Javascript All times are GMT
Page 1 of 1

 


Free Web Hosting, Commercial Web Hosting, PHP/mySQL Copyright © 2009
Free Scripts Directory | Free Software Downloads | Newsgroups Directory | Optel.net | Mirroraty | Cruised.net | Hardware Keylogger