Tip: you can modify some code before running
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><title>Beautiful and practical js tab menu</title><meta http-equiv="content-type" content="text/html;charset=gb2312"><!--把下面代码加到<head>与</head>之间--><style type="text/css"># Header {background-color: # F8F4EF; height: 200px; width: 400px; border: 1px solid # ECE1D5; font-family: ""; font-size: 12px ;} # menu {margin: 0; padding: 0; list-style-type: none;} # menu li {display: block; width: 100px; line-height: 23px; text-align: center; float: left; cursor: pointer ;}. sec1 {background-color: # FFFFCC ;}. sec2 {background-color: #00 CCFF ;}. block {display: block ;}. unblock {display: none ;}</style><script language=javascript>Function secBoard (n) {var menu = document. getElementById ('menu '). getElementsByTagName ('Lil'); var main = document. getElementById ('main '). getElementsByTagName ('Lil'); for (I = 0; I <menu. length; I ++) {menu [I]. className = "sec1";} menu [n]. className = "sec2"; for (I = 0; I <main. length; I ++) {main [I]. style. display = "none";} main [n]. style. display = "block ";}</script></head><body><!--把下面代码加到<body>与</body>之间--><div id="header"><!--导航选项区域--><ul id="menu"><li onMouseOver="secBoard(0)" class="sec2">Latest news</li><li onMouseOver="secBoard(1)" class="sec1">Latest article</li><li onMouseOver="secBoard(2)" class="sec1">Latest log</li><li onMouseOver="secBoard(3)" class="sec1">New forum posts</li></ul><!--导航选项区域--><!--内容显示区域--><ul id="main"><li class="block">Article 1: 11 knowledge questions and answers that are required to prevent insects</li><li class="unblock">Second content: Limited-time shopping mall flash sales, Countdown JS code</li><li class="unblock">Third content: A Song of the millionaire, man!</li><li class="unblock">Fourth content: key points of user experience for sixteen websites</li></ul><!--内容显示区域--></div></body></html>
Tip: you can modify some code before running