Jump to content

  • Free consultations and support
  • Live chatClick Here for Live Chat
  • Call ico 1888-906-1888
    Phone support: Open

    Ready for your call :)

    Our business hours:

    Mon — Fri, 2am — 8pm (EST)

    US & EU support teams

    Phone support: Closed

    We are back in: 1h 20m

    Our business hours:

    Mon — Fri, 2am — 8pm (EST)

    US & EU support teams


When to Use Alerts in JavaScript

use alerts in javascript

  • Please log in to reply
 

#1 SmartWeb

SmartWeb

    Senior Member

  • Designer
  • 271 posts

Posted 27 February 2013 - 02:20 PM

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>




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users