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 27 28 29 30 31 32 33
|
<html>
<head><title>test</title>
<script type="text/javascript">
function test(url) {
myWindow=window.open(url,'','directories=no,location=no,menubar=no,resizable=no,scrollbars=no,status=no,toolbar=no,z-lock=yes,width=50,height=50');
myWindow.focus();
myWindow.blur();
titre_i="";
while (titre_i == "")
{ var titre_i = myWindow.document.title; }
myWindow.close();
var titre_a = "Titre attendu";
if (titre_i == titre_a)
{ document.write("<H1>REUSSI !!!</H1>");}
else { document.write("<H1>RATE !!!</H1>"); }
document.write("<p>" + titre_i + ' -- ' + titre_a + '</p>');
}
</script>
</head>
<body>
<input type="submit" name="button" id="button" value="Récup titre" onclick="test('test2.html')"/>
</body></html> |
Partager