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
| <!DOCTYPE html>
<html lang="fr" dir="ltr">
<head>
<!-- cache-control avec max-age=60 pour le développement uniquement -->
<meta http-equiv="cache-control" content="public, max-age=60">
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, shrink-to-fit=no">
<meta name="author" content="Daniel Hagnoul">
<title>test</title>
<style>
* {
box-sizing: border-box;
}
/* code du test */
main {
min-height: 100rem;
width: 100%
}
/* fin code du test */
</style>
<script>
'use strict';
document.addEventListener( "DOMContentLoaded", ev => {
// code du test
// fin code du test
}, false );
window.addEventListener( "load", ev => {
// code du test
const
elemMain = document.querySelector( "main" ),
listenerMain = ev => {
elemMain.style.backgroundColor = "red";
setTimeout( () => {
elemMain.style.backgroundColor = "white";
elemMain.removeEventListener( "mouseenter", listenerMain, false );
}, 2000 );
};
elemMain.addEventListener( "mouseenter", listenerMain, false );
// fin code du test
}, false );
</script>
</head>
<body>
<p>
<main>
</main>
<a href="DH2.mp3"><img src="gamer.png" width="65" height="65"></a>
</p>
<p> </p>
<p> </p>
<p><a href="DH3.mp3"><img src="racer.png" width="64" height="65"></a></p>
</body>
</html> |
Partager