1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26
|
<script type="text/javascript">
var counter = 0
var runit
function watchwindows() {
var liste=""
for(elt in window.parent){
liste+= elt + " => " + window.parent[elt] + "\n"
}
alert(liste)
if (window.parent.length > counter) {
alert('une fenetre à été ouverte');
}
}
function launch() {
runit = setInterval(watchwindows, 1500)
}
</script>
</head>
<body onload="launch()">
<input type="button" onclick="window.open('about:blank');self.focus();" vlaue='test' />
</body>
</html> |
Partager