以下是引用片段:<scriptlanguage="JavaScript"> functionhideAll(){ for(i=0;i<odiv.length;i++){ odiv[i].style.display="none"; } } functionshowObj(num) { if(odiv[num].style.display=="none") { hideAll(); odiv[num].style.display="inline"; } else{ odiv[num].style.display="none"; } } </script> <styletype="text/css"> <!-- .diVCtrl{ cursor:hand;height:20px; } --> </style> <divonClick="showObj(0)"class="divctrl"><ahref="http://b1d.abc.com/index.PHP#">div</a></div> <divid="odiv"style="display:inline"> <li><ahref="http://b1d.abc.com/index.php#">div</a></li> <li><ahref="http://b1d.abc.com/index.php#">div</a></li> <li><ahref="http://b1d.abc.com/index.php#">div</a></li> <li><ahref="http://b1d.abc.com/index.php#">div</a></li> <li><ahref="http://b1d.abc.com/index.php#">div</a></li> </div> <divonClick="showObj(1)"class="divctrl"><ahref="http://b1d.abc.com/index.php#">div</a></div> <divid="odiv"style="display:inline"> <li><ahref="http://b1d.abc.com/index.php#">div</a></li> <li><ahref="http://b1d.abc.com/index.php#">div</a></li> <li><ahref="http://b1d.abc.com/index.php#">div</a></li> <li><ahref="http://b1d.abc.com/index.php#">div</a></li> <li><ahref="http://b1d.abc.com/index.php#">div</a></li> </div> <divonClick="showObj(2)"class="divctrl"><ahref="http://b1d.abc.com/index.php#">div</a></div> <divid="odiv"style="display:inline"> <li><ahref="http://b1d.abc.com/index.php#">div</a></li> <li><ahref="http://b1d.abc.com/index.php#">div</a></li> <li><ahref="http://b1d.abc.com/index.php#">div</a></li> <li><ahref="http://b1d.abc.com/index.php#">div</a></li> <li><ahref="http://b1d.abc.com/index.php#">div</a></li> </div> <divonClick="showObj(3)"class="divctrl"><ahref="http://b1d.abc.com/index.php#">div</a></div> <divid="odiv"style="display:inline"> <li><ahref="http://b1d.abc.com/index.php#">div</a></li> <li><ahref="http://b1d.abc.com/index.php#">div</a></li> <li><ahref="http://b1d.abc.com/index.php#">div</a></li> <li><ahref="http://b1d.abc.com/index.php#">div</a></li> <li><ahref="http://b1d.abc.com/index.php#">div</a></li> </div> <divonClick="showObj(4)"class="divctrl"><ahref="http://b1d.abc.com/index.php#">div</a></div> <divid="odiv"style="display:inline"> <li><ahref="http://b1d.abc.com/index.php#">div</a></li> <li><ahref="http://b1d.abc.com/index.php#">div</a></li> <li><ahref="http://b1d.abc.com/index.php#">div</a></li> <li><ahref="http://b1d.abc.com/index.php#">div</a></li> <li><ahref="http://b1d.abc.com/index.php#">div</a></li> </div> ASP <% if request("showobj")<>"" then response.Cookies("showobj")=request("showobj") if isnull(response.Cookies("showobj")) then response.Cookies("showobj")=0 %> <script language="Javascript"> function hideAll() { for(i=0;i<odiv.length;i++) { odiv[i].style.display="none"; } } function showObj(num) { if (odiv[num].style.display=="none") { hideAll(); odiv[num].style.display="inline"; } else { odiv[num].style.display="none"; } } </script> <style type="text/css"> <!-- .divctrl{ cursor:hand;height:20px; } --> </style> <divonClick="showObj(0)"class="divctrl"><ahref="?showobj=0">div</a></div> <divid="odiv"style="display:<%ifrequest.Cookies("showobj")=0then:response.Write"inline":else response.Write"none":endif%>"> <li><ahref="http://b1d.abc.com/index.php#">div</a></li> <li><ahref="http://b1d.abc.com/index.php#">div</a></li> <li><ahref="http://b1d.abc.com/index.php#">div</a></li> <li><ahref="http://b1d.abc.com/index.php#">div</a></li> <li><ahref="http://b1d.abc.com/index.php#">div</a></li> </div> <divonClick="showObj(1)"class="divctrl"><ahref="?showobj=1">div</a></div> <divid="odiv"style="display:<%ifrequest.Cookies("showobj")=1then:response.Write"inline":else response.Write"none":endif%>"> <li><ahref="http://b1d.abc.com/index.php#">div</a></li> <li><ahref="http://b1d.abc.com/index.php#">div</a></li> <li><ahref="http://b1d.abc.com/index.php#">div</a></li> <li><ahref="http://b1d.abc.com/index.php#">div</a></li> <li><ahref="http://b1d.abc.com/index.php#">div</a></li> </div> <divonClick="showObj(2)"class="divctrl"><ahref="?showobj=2">div</a></div> <divid="odiv"style="display:<%ifrequest.Cookies("showobj")=2then:response.Write"inline":else response.Write"none":endif%>"> <li><ahref="http://b1d.abc.com/index.php#">div</a></li> <li><ahref="http://b1d.abc.com/index.php#">div</a></li> <li><ahref="http://b1d.abc.com/index.php#">div</a></li> <li><ahref="http://b1d.abc.com/index.php#">div</a></li> <li><ahref="http://b1d.abc.com/index.php#">div</a></li> </div> <divonClick="showObj(3)"class="divctrl"><ahref="?showobj=3">div</a></div> <divid="odiv"style="display:<%ifrequest.Cookies("showobj")=3then:response.Write"inline":else response.Write"none":endif%>"> <li><ahref="http://b1d.abc.com/index.php#">div</a></li> <li><ahref="http://b1d.abc.com/index.php#">div</a></li> <li><ahref="http://b1d.abc.com/index.php#">div</a></li> <li><ahref="http://b1d.abc.com/index.php#">div</a></li> <li><ahref="http://b1d.abc.com/index.php#">div</a></li> </div> <divonClick="showObj(4)"class="divctrl"><ahref="?showobj=4">div</a></div> <divid="odiv"style="display:<%ifrequest.Cookies("showobj")=4then:response.Write"inline":else response.Write"none":endif%>"> <li><ahref="http://b1d.abc.com/index.php#">div</a></li> <li><ahref="http://b1d.abc.com/index.php#">div</a></li> <li><ahref="http://b1d.abc.com/index.php#">div</a></li> <li><ahref="http://b1d.abc.com/index.php#">div</a></li> <li><ahref="http://b1d.abc.com/index.php#">div</a></li> </div> (责任编辑:admin) |