JavaScript alerts used in the following situations:
•If you want to display a message to the users before doing anything else on the website.
•If You want to warn the users about something on your website.
•If an error occurs and you want to inform your users of the problem.
•If you want to ask the users for confirmation before some action
Ex. using an HTML button with the onClick event.
<form>
<input type="button" onclick=
"alert('Are you absolutely sure you want to continue? ')"
value="Confirmation Alert">
</form>
When to Use Alerts in JavaScript
JavaScript alerts used in the following situations:
•If you want to display a message to the users...
use alerts in javascript
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users