Auteur: honolulu ((---.free.fr)
Date: 26-04-2003 16:56
[ msg ]
|
M'enfin, le rapport est évident !
Soit une page nommée appel.html
<html>
<head>
<title>
Ma page qui appelle la pop...
</title>
</head>
<body>
<a href="javascript:window.open('pop.html','pop','width=400,height=400');window.pop;">je clique ici pour ouvrir la pop-up.......</a>
</body>
</html>
et une page nommée pop.html
<html>
<head>
<title>
Ma pop-up...
</title>
<script>function quel(e) {
if (navigator.appName == 'Microsoft Internet Explorer'){
if (event.button==2){window.close();}
}
if (navigator.appName == 'Netscape'){
if (e.which==3){window.close();}
}
}
window.onmousedown=quel;
document.onmousedown=quel;
if (document.layers) window.captureEvents(Event.MOUSEDOWN);
</script>
</head>
<body>
mon image ou mon texte à protéger.......
</body>
</html>
la page appel.html sert évidemment à appeler la pop-up... tu fais un copier-coller des codes des 2 pages et tu testes...
ça marche sous IE 5.5 et NS 6.2...
|