Javascript alert and confrim box
Upcoming SlideShare
Loading in...5
×
 

Javascript alert and confrim box

on

  • 1,032 views

 

Statistics

Views

Total Views
1,032
Views on SlideShare
1,032
Embed Views
0

Actions

Likes
0
Downloads
3
Comments
0

0 Embeds 0

No embeds

Accessibility

Categories

Upload Details

Uploaded via as Microsoft PowerPoint

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

Javascript alert and confrim box Javascript alert and confrim box Presentation Transcript

  • Review• Write the basic JavaScript Syntax• What is the function of the <script> tag?• What is the use of the semi-colon?• Is Javascript can be written in toggle case? Why?• What is the standard JavaScript command for displaying text?• Which sections of the html we can write/appear the JavaScript codes?
  • ALERT BOX• An alert box is often used to “alert” the user for some information message. It contains a single statement and an OK button. When an alert box pops up, the user needs to click the OK button to proceed. (Note: the browser settings is Filipino)
  • <html><body><script type= “text/javascript”>alert(“Oops! You pressed the wrong key! Try Again!”);</script></body></html>
  • Confirm Box• The confirm box is often used if you want the user to “confirm” or accept something. It contains question and the OK and the CANCEL buttons. When a confirm box pops up, the user needs to click either OK or CANCEL button to proceed. (Note: the browser settings is Filipino)
  • Syntax of an Confirm Box<html><body><script>confirm(“Are you sure all the information you entered are correct”);</script></body></html>
  • Prompt box• A prompt box can be used to allow the user to input data before entering a page. It contains a question, an empty box called “textfield”, and OK and Cancel button. When prompt box pops up, the user needs to click either the OK or the Cancel button to proceed after inputting the data.
  • Syntax of a prompt box<html><body><script>prompt(“Please enter your name”);</script></body></html>
  • COMPUQUIZ/ EXERCISES1. Write the JavaScript code to display the following:
  • 4. Used to allow user to input data.5. Used to allow user to accept something.
  • Assignment/Agreement•Start working your web page for your final requirement to pass the subject.