2. 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?
3. 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)
5. 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)
6. Syntax of an Confirm Box
<html>
<body>
<script>
confirm(“Are you sure all the information you
entered are correct”);
</script>
</body>
</html>
7. 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.
8. Syntax of a prompt box
<html>
<body>
<script>
prompt(“Please enter your name”);
</script>
</body>
</html>