Answers for "how to create a pop up window in javascript"

5

how to make windows pop up in html

<!DOCTYPE html>
<html>
<head>
	<meta charset="utf-8">
	<title></title>
</head>
<body>
<button onclick = 'f=window.open("URL,exampe - google.com","fenetre","the style (without style tag, example - width=400, height=600, no px")'style="cursor: pointer;">pop up</button>
</body>
</html>
Posted by: Guest on June-23-2021
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 "Javascript"

Browse Popular Code Answers by Language