2016-01-20 21:24:51 +01:00
|
|
|
<!DOCTYPE html>
|
|
|
|
<html>
|
|
|
|
<body>
|
|
|
|
|
2016-08-18 16:13:38 +02:00
|
|
|
<button onclick="openWin()" id="open-button">Open "myWindow"</button>
|
|
|
|
<button onclick="closeWin()" id="close-button">Close "myWindow"</button>
|
2016-01-20 21:24:51 +01:00
|
|
|
|
|
|
|
<script>
|
|
|
|
var myWindow;
|
|
|
|
|
|
|
|
function openWin() {
|
|
|
|
myWindow = window.open("", "myWindow", "width=200, height=100");
|
|
|
|
}
|
|
|
|
|
|
|
|
function closeWin() {
|
|
|
|
myWindow.close();
|
|
|
|
myWindow.close();
|
|
|
|
}
|
|
|
|
</script>
|
|
|
|
|
|
|
|
</body>
|
|
|
|
</html>
|