Kopieren Sie den Code -Code wie folgt:
<!
<html xmlns = "http://www.w3.org/1999/xhtml">
<kopf>
<meta http-äquiv = "content-type" content = "text /html; charset = utf-8" /> />
<title> Registerkarten implementieren IMG Bildtransformation </title>
<Style type = "text/css">
#Main {Höhe: 420px;
#Kopf {{
Breite: 400px;
Höhe: 52px;
Pose: absolut;
links: 10px;
Oben: -12px;
Hintergrundfarbe: Grün;
}
#Head li {float: links;
#Inhalt {
Breite: 400px;
Höhe: 350px;
Hintergrundfarbe:#fc6;
Text-Align: Mitte;
Pose: absolut;
Oben: 36px;
links: 10px;
}
</style>
</head>
<body>
<div id = "main">
<div id = "head">
<ul>
<li id = "tab1" onmouseover = "show (1)" style = "background-color: #fff"> bild 1 </li>
<li id = "tab2" onmouseover = "show (2)"> bild 2 </li>>
<li id = "tab3" onmouseover = "show (3)"> bild 3 </li>>
<li id = "tab4" onmouseover = "anzeigen (4)"> Bild 4 </li>
</ul>
</div>
<div id = "content">
<p id = "p1"> <img src = "bild 0"/> </p>
<p id = "p2" style = "display: keine;"> <img src = "bild 1"> </p>
<p id = "p3" style = "display: keine;"> <img src = "bild 2"/> </p>
<p id = "p4" style = "display: keine;"> <img src = "bild 3"/> </p>
</div>
</div>
</body>
<Script>
Funktionshow (n) {
für (var i = 1; i <= 4; i ++) {
document.getElementById ("tab"+i) .style.backgroundcolor = 'green';
document.getElementById ("p"+i) .style.display = 'none';
// Zeigen Sie die Kontrolle des verborgenen Inhalts des Inhalts an, sollte keine sein, versteckt
}
document.getElementById ("tab"+n) .style.backgroundColor = 'White';
document.getElementById ("p"+n) .style.display = 'block';
// Block Block kann das versteckte angezeigt werden
}
</script>
</html>