popup message in javascript code example
Example 1: simple alert program in javascript
alert("this is the alert")
Example 2: popup JavaScript code
document.getElementById("open-popup-btn").addEventListener("click",function(){
document.getElementsByClassName("popup")[0].classList.add("active");
});
document.getElementById("dismiss-popup-btn").addEventListener("click",function(){
document.getElementsByClassName("popup")[0].classList.remove("active");
});