<!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> <meta http-equiv="Content-Type" content="text/html; charset=gb2312" /> <title>示例</title> <script language="javascript"> function SwcAr( POjbID, ViewID, MaxID ) { try { for( var i=1; i<=MaxID; i++ ) { document.getElementById(POjbID+"Div"+i).style.display = "none"; document.getElementById(POjbID+i).style.fontWeight = "normal"; document.getElementById(POjbID+i).style.backgroundColor = "#ff0000"; document.getElementById(POjbID+i).style.color = "#fff"; }
document.getElementById(POjbID+"Div"+ViewID).style.display = ""; document.getElementById(POjbID+ViewID).style.fontWeight = "bold"; document.getElementById(POjbID+ViewID).style.color = "#ff3300"; document.getElementById(POjbID+ViewID).style.backgroundColor = "#00ff00"; } catch(err) {} } </script> <style> body{font-size:12px;} #ara{width:360px;background-color:#cfc;border:#060 1px solid;} #Sah li{ float:left; list-style:none; cursor:pointer; width:80px; background-color:#000000; color:#fff; text-align:center; padding:5px; } #Sah .df{background-color:#0f0;color:#f30;font-weight:bold;} </style> </head>
<body> <div id="ara"> <div id="Sah"> <li id="ac1" class="df"><a onmouseover="SwcAr('ac','1',4)" title="请单击">业界资讯</a></li> <li id="ac2"><span><a onmouseover="SwcAr('ac','2',4)" title="请单击">技术广角</a></span></li> <li id="ac3"><span><a onmouseover="SwcAr('ac','3',4)" title="请单击"><span>求职职场</a></span></li> <li id="ac4"><span><a onmouseover="SwcAr('ac','4',4)" title="请单击"><span>休闲娱乐</a></span></li> </div> <div id="acDiv1" class="rl"> <ul> <li>业界资讯</li> <li>业界资讯</li> <li>业界资讯</li> <li>业界资讯</li> <li>业界资讯</li> <li>业界资讯</li> </ul> </div> <div id="acDiv2" class="rl" style="display:none;"> <ul> <li>技术广角</li> <li>技术广角</li> <li>技术广角</li> <li>技术广角</li> <li>技术广角</li> <li>技术广角</li> </ul> </div> <div id="acDiv3" class="rl" style="display:none;"> <ul> <li>求职职场</li> <li>求职职场</li> <li>求职职场</li> <li>求职职场</li> <li>求职职场</li> <li>求职职场</li> </ul> </div> <div id="acDiv4" class="rl" style="display:none;"> <ul> <li>休闲娱乐</li> <li>休闲娱乐</li> <li>休闲娱乐</li> <li>休闲娱乐</li> <li>休闲娱乐</li> <li>休闲娱乐</li> </ul> </div> </div> </body> </html> |