您现在的位置: 万盛学电脑网 >> 程序编程 >> 网页制作 >> Html5 >> 正文

html标签切换代码

作者:佚名    责任编辑:admin    更新时间:2022-06-22

欢迎大家在这里学习html标签切换!这里是我们给大家整理出来的精彩内容。我相信,这些问题也肯定是很多朋友在关心的,所以我就给大家谈谈这个!

<FCK:META http-equiv=Content-Type content="text/html; charset=gb2312" />

<style type="text/css">

<!--

BODY {

PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 12px; PADDING-BOTTOM: 0px; MARGIN: 0px auto; COLOR: black; LINE-HEIGHT: 150%; PADDING-TOP: 10px; BACKGROUND-COLOR: white; TEXT-ALIGN: center

}

.dis {

DISPLAY: block

}

.undis {

DISPLAY: none

}

#cntR {

WIDTH: 302px

}

#NewsTop {

CLEAR: both; MARGIN-BOTTOM: 16px

}

#NewsTop P {

FLOAT: left; LINE-HEIGHT: 21px

}

#NewsTop P.topTit {

FONT-WEIGHT: bold; WIDTH: 117px

}

#NewsTop P.topC0 {

BACKGROUND: #dcdcdc; BORDER-LEFT: #f2f2f2 1px solid; WIDTH: 40px; CURSOR: pointer

}

#NewsTop P.topC1 {

BACKGROUND: #c2130e; BORDER-LEFT: #f2f2f2 1px solid; WIDTH: 40px; COLOR: #fff

}

#NewsTop #NewsTop_tit {

BORDER-BOTTOM: #c2130e 3px solid; HEIGHT: 21px

}

#NewsTop #NewsTop_cnt {

PADDING-LEFT: 32px; BACKGROUND: url: 26px; PADDING-TOP: 7px; HEIGHT: 260px; TEXT-ALIGN: left

}

#NewsTop #NewsTop_cnt A {

COLOR: #666; TEXT-DECORATION: none

}

#NewsTop #NewsTop_cnt A:hover {

COLOR: #c2130e; TEXT-DECORATION: underline

}

-->

</style>

</HEAD>

<BODY>

<DIV id=cntR>

<DIV id=NewsTop>

<DIV id=NewsTop_tit>

<P class=topTit>新闻排行</P>

<P class=topC0>国内</P>

<P class=topC0>国际</P>

<P class=topC0>社会</P>

<P class=topC0>网评</P>

</DIV>

<DIV id=NewsTop_cnt><SPAN title="Don't delete me"></SPAN>

<SPAN>

<A href="#" _fcksavedurl="#" target=_self>新疆阜康铁路桥梁</A><BR>

<A href="#" _fcksavedurl="#" target=_self>最高法:没有超越法律程序</A><BR>

<A href="#" _fcksavedurl="#" target=_self>物权法:满70年住宅建设用地使用权将自动续期</A><BR>

<A href="#" _fcksavedurl="#" target=_self>弟弟(图)</A><BR>

<A href="#" _fcksavedurl="#" target=_self>揭开郑州神枪手神秘面纱 头号狙击手是近视眼</A><BR>

<A href="#" _fcksavedurl="#" target=_self>不排除和直接对抗可能</A><BR>

<A href="#" _fcksavedurl="#" target=_self>浙江东阳传奇</A><BR>

<A href="#" _fcksavedurl="#" target=_self>西方炒作</A><BR>

<A href="#" _fcksavedurl="#" target=_self>女孩生活无法自理请人大代表递交安乐死议案</A><BR>

<A href="#" _fcksavedurl="#" target=_self>建设部:住房公积金制度将覆盖农民工</A><BR>

<div align="right"><A href="#" _fcksavedurl="#" target=_self>...more</A></div>

</SPAN>

<SPAN>

<A href="#" _fcksavedurl="#" target=_self>美华裔女兵在营房上介入调查(图)</A><BR>

<A href="#" _fcksavedurl="#" target=_self>组图:美国总统布什车队被撞</A><BR>

<A href="#" _fcksavedurl="#" target=_self>梦露掌握肯尼迪之弟秘密遭诱骗自杀(组图)</A><BR>

<A href="#" _fcksavedurl="#" target=_self>孟加拉国严打贪官人人自危奔驰宝马抛弃路边</A><BR>

<A href="#" _fcksavedurl="#" target=_self>韩国将举行大规模军事演习(图文)</A><BR>

<A href="#" _fcksavedurl="#" target=_self>组图:土星最大卫星表面发现“海洋”</A><BR>

<A href="#" _fcksavedurl="#" target=_self>墨西哥缴获2亿美元巨额现钞(组图)</A><BR>

<A href="#" _fcksavedurl="#" target=_self>组图:全球掀起</A><BR>

<A href="#" _fcksavedurl="#" target=_self>美潜艇在百慕大失踪一晚航母战群出动搜索</A><BR>

<A href="#" _fcksavedurl="#" target=_self>匈牙利20万人示威(组图)</A><BR>

<div align="right"><A href="#" _fcksavedurl="#" target=_self>...more</A></div>

</SPAN>

<SPAN>

<A href="#" _fcksavedurl="#" target=_self>深圳女工(组图)</A><BR>

<A href="#" _fcksavedurl="#" target=_self>男子珍藏一角钱“币王”价格高达1.3万(图)</A><BR>

<A href="#" _fcksavedurl="#" target=_self>青海女孩</A><BR>

<A href="#" _fcksavedurl="#" target=_self>组图:老妻少夫演绎</A><BR>

<A href="#" _fcksavedurl="#" target=_self>陕西蓝田县电视台播放</A><BR>

<A href="#" _fcksavedurl="#" target=_self>女子自称(图)</A><BR>

<A href="#" _fcksavedurl="#" target=_self>组图:</A><BR>

<A href="#" _fcksavedurl="#" target=_self>组图:四川泸州16岁女孩打造中国第一丑女</A><BR>

<A href="#" _fcksavedurl="#" target=_self>最高法:</A><BR>

<A href="#" _fcksavedurl="#" target=_self>深圳发现前失踪</A><BR>

<div align="right"><A href="#" _fcksavedurl="#" target=_self>...more</A></div>

</SPAN>

<SPAN>

<SPAN>

<A href="#" _fcksavedurl="#" target=_self>深圳女工(组图)</A><BR>

<A href="#" _fcksavedurl="#" target=_self>男子珍藏一角钱“币王”价格高达1.3万(图)</A><BR>

<A href="#" _fcksavedurl="#" target=_self>青海女孩</A><BR>

<A href="#" _fcksavedurl="#" target=_self>组图:老妻少夫演绎</A><BR>

<A href="#" _fcksavedurl="#" target=_self>陕西蓝田县电视台播放</A><BR>

<A href="#" _fcksavedurl="#" target=_self>女子自称(图)</A><BR>

<A href="#" _fcksavedurl="#" target=_self>组图:</A><BR>

<A href="#" _fcksavedurl="#" target=_self>组图:四川泸州16岁女孩打造中国第一丑女</A><BR>

<A href="#" _fcksavedurl="#" target=_self>最高法:</A><BR>

<A href="#" _fcksavedurl="#" target=_self>深圳发现前失踪</A><BR>

<div align="right"><A href="#" _fcksavedurl="#" target=_self>...more</A></div>

</SPAN>

</DIV>

<SCRIPT>

var Tags=document.getElementById('NewsTop_tit').getElementsByTagName('p'); 

var TagsCnt=document.getElementById('NewsTop_cnt').getElementsByTagName('span'); 

var len=Tags.length; 

var flag=1;//修改默认值

for(i=1;i<len;i++){

Tags[i].value = i;

Tags[i].onmouseover=function(){changeNav(this.value)}; 

TagsCnt[i].className='undis';

}

Tags[flag].className='topC1';

TagsCnt[flag].className='dis';

function changeNav(v){

Tags[flag].className='topC0';

TagsCnt[flag].className='undis';

flag=v;

Tags[v].className='topC1';

TagsCnt[v].className='dis';

}

</SCRIPT>

</DIV>

</DIV>

</BODY></HTML>

 

好了,html标签切换内容就给大家介绍到这里了。希望大家继续关注我们的网站!

相关推荐:

什么是html标签类型