网页切换弹出切换城市层的简单研究

< html >
< head >
< title > NameTitle </ title >
< META  http-equiv =Content-Type  content ="text/html; charset=gb2312" >
</ head >

< SCRIPT  language =javascript  >
function switchinCity()
{
    document.getElementById(
"site_Nav").style.display="";
    document.onclick
=hideinCity;
        
    
var lia=document.getElementById("site_Nav").getElementsByTagName("li");
    
for(var i=0;i<lia.length;i++)
    
{
        lia[i].onmouseover
=showCity;
        lia[i].onmouseout
=showCity;
    }

}


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

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


function hideinCity(e){
    
var obj=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 >
< FORM  id =formsearch  name =formsearch  method =get  target =_blank >

< DIV  id =t_sitename > 上海站 
< SPAN  id =switchCitybtn  onmouseover =switchinCity() > [切换城市] </ SPAN >
</ DIV >

< DIV  id =site_Nav  style ="DISPLAY: none"  onmouseout =hideCity() >
< LI  class =l_li >
< SPAN  class =fontred > 上海 </ SPAN >   
< href ="http://bj.studyget.com/" > 北京 </ A >   
< href ="http://gz.studyget.com/" > 广州 </ A >   
< href ="http://tj.studyget.com/" > 天 津 </ A >   
< href ="http://wh.studyget.com/" > 武汉 </ A >   
< href ="http://sz.studyget.com/" > 深圳 </ A >  
</ LI >

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

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

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

</ FORM >
</ body >
</ html >
 
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值