Name | Progress |
---|---|
JavaScript for Beginners Introduction | Not Read |
Setting up environment | Not Read |
Name | Progress |
---|---|
Section 1 | Not Read |
Arithmetic Operations | Not Read |
Type Conversion | Not Read |
Name | Progress |
---|---|
Section 1 | Not Attempted |
Section 2 | Not Attempted |
Your next task will be to learn how to use window.alert() method to display alert dialog boxes with specified messages
window.alert() is used to display alerts to users and requires their interaction to proceed. It is a part of the Windows interface and is useful for quick debugging, user notifications, or simple interactions. When alert() is called, the browser stops executing the script until the user acknowledges the alert by clicking OK.
Step-by-step guide:
From the index.html file in section 1, modify the body part by adjusting the script command by the following code
<script>
window.alert('Hello World!');
</script>
The alert message should appear as a pop-up box.