Answers for "pop-up window"

0

windows pop up

<!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
0

Close popup window

<html>
<script>
var newWindow;

function openWindow() {
  newWindow = window.open("", "myWindow", "width=200,height=100");
  newWindow.document.write('<a href="javascript:window.close();" class="video-close">Close this window</a>');
}

function closeWindow() {
  newWindow.close();
}
</script>
<h3 style="color:brown"> Close Window Example </h3>
<body>
<button onclick="openWindow()">Open New Window</button>
<br><br>
<button onclick="closeWindow()">Close New Window </button>

</body>
</html>
Posted by: Guest on October-01-2021

Browse Popular Code Answers by Language