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
| <!DOCTYPE Html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>[...]</title>
<style type="text/css">
#enTeteGauche {
height :50px;
background-color : #e0e0e0;
border : 1px solid #888;
}
#fonctions {
height :150px;
width :150px;
background-color : #e0e0f0;
border : 1px solid #88f;
display : none;
}
</style>
<script type="text/javascript">
var compt; // variable globale
function timer(){
compt=(setTimeout("document.getElementById('fonctions').style.display= 'none';", 1000));
};
</script></head>
<body>
<div id="enTeteGauche"
onclick = "if(document.getElementById('fonctions').style.display == 'block'){
document.getElementById('fonctions').style.display = 'none';
}
else{
document.getElementById('fonctions').style.display= 'block';
};"
onmouseout = "timer();">
</div>
<div id="fonctions"
onmouseover = "clearTimeout(compt);"
onmouseout = "this.style.display = 'none';">
</div>
</body>
</html> |