oups...
oublié de mettre le code dans le post pérécedent ...
IE gère vraiment le Zindex des TextNodes comme une quiche moisie
Code : Sélectionner tout - Visualiser dans une fenêtre à part
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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=windows-1252"> <title>copiez moi</title> <script type="text/javascript"> function stopCopy(){ var ObjStop=document.getElementById('stop') ObjStop.style.zIndex=9999; alert(ObjStop.style.zIndex) ObjStop.onclick=function(evt){ evt=(evt)?evt:window.event; if (evt.stopPropagation) {evt.stopPropagation();} else{evt.cancelBubble = true;} } } </script> <style type="text/css"> tableau {z-index:1; position:absolute;} tr.td.div {position:relative;} #stop {background:transparent; height:100%; width:100%; position: absolute; top:0; left:0;} #stop {z-index:9999 !important;} </style> </head> <body onload="stopCopy()" > <div id="stop"> </div> <div id="tableau" style="background-color:red;top:0;left:0;" onclick="alert('coucou')"> <table border="1" width="100%" > <tr> <td ><div>copiez moi!</div></td> <td >copiez moi!</td> <td >copiez moi!</td> <td >copiez moi!</td> <td >copiez moi!</td> </tr> <tr> <td >copiez moi!</td> <td >copiez moi!</td> <td >copiez moi!</td> <td >copiez moi!</td> <td >copiez moi!</td> </tr> <tr> <td >copiez moi!</td> <td >copiez moi!</td> <td >copiez moi!</td> <td >copiez moi!</td> <td >copiez moi!</td> </tr> <tr> <td >copiez moi!</td> <td >copiez moi!</td> <td >copiez moi!</td> <td >copiez moi!</td> <td >copiez moi!</td> </tr> </table> <div style="position:relative;background-color:lime;">test de texte dasn un div au lieu d'un td</div> </div> </body> </html>








Répondre avec citation


Partager