Javascript: Alert

This entry is part 8 of 27 in the series Javascript Tutorial

The JavaScript alert is a dialogue box that pops up from the browser.

<!DOCTYPE html>
<h3>Click to alert me.</h3>
<button onclick="myFunction()">Click Me</button>
 function myFunction() {
   alert("I pop up from the browser!");


This alert function becomes handy when you want to check if a part of the code has been executed.


Series Navigation<< Javascript: Basic HTML tags
Javascript: A loosely typed language >>