Facebook Emotion

Facebook Emotion

Facebook Emotion for chat. Make your facebook chat is COOL, Faceook Ascii Art

Graphic Design

graphic design

all about graphic design ie. MSN Display pictures, Icon, PSD, Photoshop, Vectorclick here.

Career Inspire Corner

Career Inspire

Career Inspire Corner Good Technique for Job

JavaScript :The alert, confirm, and prompt boxes

Peacefulkate | Thursday, June 23, 2011 | 0 ความคิดเห็น

The three “commands” involved in creating alert, confirm, and prompt boxes are:
window.alert()
window.confirm()
window.prompt()
Lets look at them in detail. The first one is:
window.alert()
This command pops up a message box displaying whatever you put in it. For example:
<body>
<script type="text/javascript">
window.alert("My name is George. Welcome!")
</script>
</body>
As you can see, whatever you put inside the quotation marks, it will display it.
The second one is:
window.confirm()
Confirm is used to confirm a user about certain action, and decide between two choices depending on what the user chooses.
<script type="text/javascript">
var x=window.confirm("Are you sure you are ok?")
if (x)
window.alert("Good!")
else
window.alert("Too bad")
</script>
Click here for output:
//
There are several concepts that are new here, and I’ll go over them. First of all, “var x=” is a variable declaration; it declares a variable (“x” in this case) that will store the result of the confirm box. All variables are created this way. x will get the result, namely, “true” or “false”. Then we use a “if else” statement to give the script the ability to choose between two paths, depending on this result. If the result is true (the user clicked “ok”), “good” is alerted. If the result is false (the user clicked “cancel”), “Too bad” is alerted instead. (For all those interested, variable x is called a Boolean variable, since it can only contain either a value of “true” or “false”).
The third one is:
window.prompt()
Prompt is used to allow a user to enter something, and do something with that info:
Click here for output:
<script type="text/javascript">
var y=window.prompt("please enter your name")
window.alert(y)
</script>
ที่มา: http://www.javascriptkit.com/javatutors/alert2.shtml

Free Corner: , , , ,

0 ความคิดเห็น

Fav Corner

Programming (16) Facebook (10) Graphic Design (9) ASCII Name (8) Social Media (8) javascript (8) Facebook ASCII (7) Facebook Symbols (7) Cool Symbols (6) Google logo (6) doodle (6) Facebook Emotion (5) ASCII MSN Name (4) Adapted Graphic (4) Cool Facebook Text (4) Cool MSN Symbols Name (4) Cool Msn Symbols (4) ASP (3) CSS (3) Career Corner (3) Career Inspire (3) Cool Facebook Display (3) Cool Msn Name (3) Msn Pictures (3) database (3) Adecco Thailand (2) English (2) Facebook Campaign (2) Graphic Horoscope (2) IIS (2) Internet Browser (2) Knowledge (2) MS SQL (2) MsnDisplay (2) PHP (2) Social media Tool (2) Software (2) แต่งภาพออนไลน์ (2) 5 Innovative Facebook Campaigns to Learn From (1) ASP.Net (1) Adobe (1) Albert Szent Gyorgyi (1) Alert window (1) CGI (1) CSS Table (1) CSS Tool (1) Cartoon (1) Coding (1) Colors in English (1) Convert BahtText (1) Crowdsourcing (1) Css Forms (1) Database model (1) Designer Template (1) Display Copy Right (1) Download Google Chrome (1) Earth Day 2012 (1) English Grammar (1) English writing (1) Example of Social Media Job (1) Face your manga (1) Facebook Admin (1) Facebook App (1) Facebook Chat (1) Facebook Group (1) Facebook Profile (1) Fail (1) Father's Day of Thailand (1) Filter only Number (1) Fish (1) Fish ASCII (1) Free Activity (1) Free Horoscope Display (1) Full Screen window (1) Google Chrome (1) Google plus username (1) Google+ (1) Google+ Username (1) HR Recruitment (1) HR Solution (1) Happy Birthday (1) Happy Birthday 13th Google (1) Happy Holiday Logo (1) Hide notice Warning in PHP5 (1) How to add Classic ASP to IIS7 (1) How to create group (1) How to make iframe full height (1) HowTo Open Animated GIFs with Photoshop CS3; (1) ISAPI (1) Image Rotation (1) Japanese word (1) Keroro (1) Let the Music Heal Your Soul (1) Like (1) Love Symbols (1) Measuring Social Media ROI (1) Merry Christmas Logo (1) MilkTea (1) Msn Display (1) New Facebook Feature (1) Onion (1) PHP5 (1) Programming Tool (1) Programming.Display All IP Variables (1) Random Images (1) SQL Statement (1) Salary Guide in Thailand (1) Social Media Career (1) Social Media Job (1) Social Media Job Description (1) Star and Flower Symbols (1) Tank (1) Template (1) Thailand National Day (1) Thailand Salary Guide 2012 (1) Thailand flag on Google Logo (1) Top Css Table (1) Twitter (1) Web Service Extension IIS7 (1) WordPress (1) Wordpress database (1) bunny (1) customer engagement (1) cute face (1) example of database (1) facebook fanpage (1) fanpage (1) free blogger template (1) free stuff (1) free template (1) free wordpress template (1) function Bahttext (1) funny photo (1) html (1) japanese to english (1) mySQL (1) open full window (1) open new window command (1) photoshop (1) rounded corner (1) short name google (1) social bookmarking (1) social media marketing (1) symbol แชททางเฟสบุค (1) vocaburaly (1) wordpress table (1) www.adecco.co.th (1) กำหนดรูปให้หมุนด้วย javascript (1) คีย์ข้อมูบเฉพาะตัวเลข (1) ฐานข้อมูลเงินเดือนประเทศไทย (1) ดาวน์โหลด Google Chrome (1) ดูเดิล (1) ตัวอย่างฐานข้อมูลธุรกิจ (1) ทำให้กรอบด้านข้างไอเฟรมเต็ม (1) รวมภาพตลก (1) สร้างกลุ่มในเฟสบุค (1) ออกแบบเว็บไซต์ (1) เพลง (1) เอาโปรแกรม Adobe ออกจากเครื่อง (1) แปลงตัวเลขให้เป็นคำอ่าน (1)