Tampilkan postingan dengan label script. Tampilkan semua postingan
Tampilkan postingan dengan label script. Tampilkan semua postingan

Alert, Confirm, and Prompt boxes in Javascript

Posted by Unknown Sabtu, 15 Februari 2014 0 komentar
The three "commands" involved in creating alert, confirm, and prompt boxes are:
  • window.alert()
  • window.confirm()
  • window.prompt()
window.alert() :This command pops up a message box displaying whatever you put in it.
 
<body>
<script type="text/javascript">
window.alert("Iam an alert box!!!")
</script>
</body>
window.confirm():Confirm is used to confirm a user about certain action, and decide between two choices depending on what the user chooses.
 
<body>
<script type="text/javascript">
var x=window.confirm("Are you sure?")
if (x)
window.alert("Yes!")
else
window.alert("No")
</script>
</body>
window.prompt():Prompt is used to allow a user to enter something, and do something with that info:
 
<body>
<script type="text/javascript">
var y=window.prompt("Enter your name here...")
window.alert(y)
</script>
</body>

Baca Selengkapnya ....

HTML Tag - Scripting

Posted by Unknown Selasa, 03 September 2013 0 komentar
<script>
This
tag is used to define a client-side script, such as a javascript.
<noscript>
This
tag is used to define an alternate content for users that have disabled scripts in their browser or have a browser that doesn't support script.The <noscript> can be used in both <head> and <body>.


Baca Selengkapnya ....
Trik SEO Terbaru support Online Shop Baju Wanita - Original design by Bamz | Copyright of android populer.