Sol descans
De wikiserver
La revisió el 16:44, 26 oct 2020 per Jnoguera (Discussió | contribucions) (Es crea la pàgina amb «<source lang="javascript"> <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <t...».)
<!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>