js滑门,js滑门效果,js滑动,js选项卡 js滑门特效 将下列代码保存为html运行即可
<STYLE type=text/css>
.titleStyle{
background-color:#AAC9D9;
color:#000066;
border-top:1px solid #FFFFFF;
font-size:12px;
cursor:hand;
font-weight: bold;
text-align: left;
padding-left: 20px;
}
.contentStyle{
background-color:#DDEAF0;
color:blue;
font-size:12px;
text-align: left;
padding-left: 20px;
line-height: 200%;
}
</STYLE>
<TABLE>
<TBODY>
<TR>
<TD><A onclick=changeItem(0); href="#">1</A> <A onclick=changeItem(1); href="#">2</A></TD></TR></TBODY></TABLE>
<SCRIPT language=JavaScript>
<!--
var layerTop=0;
var layerLeft=0;
var layerWidth=180;
var titleHeight=28;
var contentHeight=300;
var stepNo=10;
var itemNo=0;runtimes=0;
document.write('<span id=itemsLayer style="position:relative;overflow:hidden;border:1px solid #AAC9D9;left:'+layerLeft+';top:'+layerTop+';width:'+layerWidth+';">');
function addItem(itemTitle,itemContent)
{
itemHTML='<div id=item'+itemNo+' itemIndex='+itemNo+' style="position:relative;left:0;top:'+(-contentHeight*itemNo)+';width:'+layerWidth+';"><table width=100% cellspacing="0" cellpadding="0">'+
'<tr><td height='+titleHeight+' onclick=changeItem('+itemNo+') class="titleStyle" align=center>'+itemTitle+'</td></tr>'+
'<tr><td height='+contentHeight+' class="contentStyle">'+itemContent+'</td></tr></table></div>';
document.write(itemHTML);
itemNo++;
}
addItem('桌面环境管理外包','<a href="年目录</a> <BR><a href="年目录</a> <BR>');
addItem('IT外包服务','<a href="">桌面环境管理外包</a> <BR><a href="">系统维护外包</a> <BR><a href="">基础架构管理外包</a> <BR><a href="">图文设计外包</a><BR><a href="">网站维护外包</a><BR><a href="">数据恢复服务</a><BR><a href="小时工</a><BR><a href="">项目外包服务</a><BR><a href="">关于IT外包</a><BR><a href="救援</a><BR><a href=");
addItem('软件工程外包','<a href="">[博客技巧]展开式菜单</a> <BR><a href="">[照片]第一集</a> <BR><a href="">[单片机学习]AT89S51教程</a> <BR>');
addItem('网站建设与推广','<a href="">单片机论坛 </a> <BR><a href="http://cafe.hanbbs.com/">人在昌平</a> <BR><a href="http://disk.zzlygo.com/myspace.aspx?username=lizhiyuan">我的网络硬盘</a> <BR>');
addItem('服务与方案','<a href="">征集中...</a> <BR>');
addItem('系统集成','<a href="">征集中...</a> <BR>');
addItem('网络安全培训','<a href="">征集中...</a> <BR>');
addItem('客户服务中心','<a href="">征集中...</a> <BR>');
document.write('</span>')
document.all.itemsLayer.style.height=itemNo*titleHeight+contentHeight;
toItemIndex=itemNo-1;onItemIndex=itemNo-1;
function changeItem(clickItemIndex)
{
toItemIndex=clickItemIndex;
if(toItemIndex-onItemIndex>0) moveUp(); else moveDown();
runtimes++;
if(runtimes>=stepNo){
onItemIndex=toItemIndex;
runtimes=0;}
else
setTimeout("changeItem(toItemIndex)",10);
}
function moveUp()
{
for(i=onItemIndex+1;i<=toItemIndex;i++)
eval('document.all.item'+i+'.style.top=parseInt(document.all.item'+i+'.style.top)-contentHeight/stepNo;');
}
function moveDown()
{
for(i=onItemIndex;i>toItemIndex;i--)
eval('document.all.item'+i+'.style.top=parseInt(document.all.item'+i+'.style.top)+contentHeight/stepNo;');
}
var clickid
changeItem(0);
//-->
</SCRIPT>
中国足彩网信息请查看IT技术专栏