Sol descans

De wikiserver
Dreceres ràpides: navegació, cerca
<!DOCTYPE html>
<html lang="en">

<head>
	<meta charset="UTF-8">
	<meta name="viewport" content="width=device-width, initial-scale=1.0">
	<title>Document</title>

	<script>

		let resul;

		function arrancar() {

			resul = setInterval(() => {

				var win = window.open("", "", "width=200,height=100");
				win.document.write("<p>Una nova Finestra!</p>");
				win.focus();

			}, 3000);

		}

		function finalizar() {
			clearInterval(resul);
		}


	</script>
</head>

<body>

	<input type="button" onclick="arrancar()" value="arrancar">
	<input type="button" onclick="finalizar()" value="Finalizar">
</body>

</html>