网页切换弹出切换城市层的简单研究
<html>
<head>
<title>NameTitle</title>
<METAhttp-equiv=Content-Typecontent="text/html;charset=gb2312">
</head>


<SCRIPTlanguage=javascript>...
functionswitchinCity()

...{
document.getElementById("site_Nav").style.display="";
document.onclick=hideinCity;

varlia=document.getElementById("site_Nav").getElementsByTagName("li");
for(vari=0;i<lia.length;i++)

...{
lia[i].onmouseover=showCity;
lia[i].onmouseout=showCity;
}
}

functionhideCity()

...{
document.getElementById("site_Nav").style.display="none";
}
functionshowCity()

...{
document.getElementById("site_Nav").style.display="";
}


functionhideinCity(e)...{
varobj=e?e.target:event.srcElement;

if(obj.id!="site_Nav"&&obj.id!="switchCitybtn")...{
document.getElementById("site_Nav").style.display="none";

document.getElementsByTagName("body")[0].onclick=function()...{};
}
}
</SCRIPT>

<body>
<FORMid=formsearchname=formsearchmethod=gettarget=_blank>

<DIVid=t_sitename>上海站
<SPANid=switchCitybtnonmouseover=switchinCity()>[切换城市]</SPAN>
</DIV>

<DIVid=site_Navstyle="DISPLAY:none"onmouseout=hideCity()>
<LIclass=l_li>
<SPANclass=fontred>上海</SPAN>
<Ahref="http://bj.studyget.com/">北京</A>
<Ahref="http://gz.studyget.com/">广州</A>
<Ahref="http://tj.studyget.com/">天 津</A>
<Ahref="http://wh.studyget.com/">武汉</A>
<Ahref="http://sz.studyget.com/">深圳</A>
</LI>

<LIclass=l_li>
<Ahref="http://nj.studyget.com/">南京</A>
<Ahref="http://hz.studyget.com/">杭州</A>
<Ahref="http://xa.studyget.com/">西安</A>
<Ahref="http://sjz.studyget.com/">石家庄</A>
<Ahref="http://dl.studyget.com/">大连</A>
<Ahref="http://jn.studyget.com/">济南</A>
</LI>

<LIclass=l_li><Ahref="http://cq.studyget.com/">重庆</A>
<Ahref="http://qd.studyget.com/">青岛</A>
<Ahref="http://cs.studyget.com/">长沙</A>
<Ahref="http://hrb.studyget.com/">哈尔滨</A>
<Ahref="http://hf.studyget.com/">合肥</A>
<Ahref="http://sy.studyget.com/">沈阳</A>
</LI>

<LIclass=l_li>
<Ahref="http://cc.studyget.com/">长春</A>
<Ahref="http://zc.studyget.com/">郑州</A>
<Ahref="http://fz.studyget.com/">福州</A>
<Ahref="http://nc.studyget.com/">南 昌</A>
<Ahref="http://cd.studyget.com/">成都</A>
</LI>
</DIV>

</FORM>
</body>
</html>
