<html>
<head>
<script type="text/javascript"> <!-- function ShowTabs(ID) { for (i = 0; i < 2; i++) { if (i == ID) { document.getElementById("TabTitle" + i).className = "titlemouseover"; document.getElementById("Tab" + i).style.display = ""; } else { document.getElementById("TabTitle" + i).className = "tabtitle"; document.getElementById("Tab" + i).style.display = "none"; } } } //--> </script> </head> <body> <ul> <ul> <li class="titlemouseover" id="TabTitle0" onmouseover="ShowTabs(0)">测试</li> <li class="tabtitle" id="TabTitle1" onmouseover="ShowTabs(1)" >test</li> </ul> <div id="Tab0" > <ul> <li>测试</li> </ul> </div> <div id="Tab1"style="display: none;" > <ul> <li>test</li> </ul> </div> </body> </html>
转载于:https://www.cnblogs.com/tanlingdangan/p/4122656.html