Alert Box In Java Script

Alert box is a dialog box which displays a message in a small window with an OK button, user have to click on the ok button to proceed.




<script type=”text/JavaScript”>

alert(“Hit me to proceed”)

document.write(” Have a nice day “);

</script >



Understanding the program:
User can type his desired message with the alert box in the quotes like alert(“what ever text user want “). This message will be displayed with the alert window to guide the user.
Output is:
Have a nice day
Scroll to Top