alert function
The function alert
shows a modal
box with a given message. The site user
will not be able to continue working until
he/she clicks on the OK
button. Only
text will be displayed, tags in the modal
box will be ignored.
Syntax
alert(message);
Example
Let's make it so that when the button is clicked, a modal box appears with a message:
<button id="button">click me</button>
let button = document.querySelector('#button');
button.addEventListener('click', function(event) {
alert('abcde');
});
: