Answers for "how to create a new popup window in javascript"

1

how to make a popup in javascript -html

// Alert
window.alert("something");
// Confirm
window.confirm("something");
// Prompt
window.prompt("something", "default text");

//source: https://www.codingem.com/javascript-popup-boxes/
Posted by: Guest on February-16-2022
0

popup in browser js

alert("Hello World!");
const result = prompt(message, default_value);
const result = confirm(message);
Posted by: Guest on March-28-2022
6

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");
});
Posted by: Guest on May-07-2021

Code answers related to "how to create a new popup window in javascript"

Code answers related to "Javascript"

Browse Popular Code Answers by Language