爱易网
IT新闻
IT新闻
爱易资讯
网站搭建
云虚拟主机教程
云服务器教程
Apache教程
IIS教程
Nginx教程
网站策划
站长文章
推广教程
淘宝客教程
网页设计
HTML教程
XHTML教程
CSS教程
HTML5教程
CSS3教程
JavaSript基础
JQuery教程
Node.js教程
前端技术
Ajax教程
Js特效
Xml教程
平面设计
页面UI设计
photoshop教程
程序开发
AI人工智能
Asp教程
Php教程
Asp.Net教程
Net Core教程
C#教程
Java教程
Jsp教程
开发技术
微信小程序教程
Uniapp开发教程
微信公众号开发
Andriod教程
IOS教程
DOS教程
Python教程
Docker教程
Windows Container教程
数据库
MSSQL教程
MySQL教程
Redis教程
Access教程
Oracle教程
数据库教程
操作系统
Linux教程
Windows教程
MAC教程
Cisco教程
交换机教程
防火墙教程
搜索
爱易网页
JS特效
可收缩和伸展的表格
可收缩和伸展的表格
日期:2014-05-18 浏览次数:20134 次
以下是程序代码
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=gb2312" /> <meta name="keywords" content="站长,网页特效,js特效,广告代码,zzjs,zzjs.net,sky,www.zzjs.net,站长特效 网" /> <meta name="description" content="www.zzjs.net,站长特效网,站长必备js特效及广告代码。大量高质量js特效,提供高质量广告代码下载,尽在站长特效网" /> <title>可收缩和伸展的表格,sky整理收集,站长特效欢迎您。</title> <script language="javascript"> function tablecollapse() { /* Variables */ var collapseClass='footcollapse'; var collapsePic='/img/icon_indextool.gif'; var expandPic='/img/icon_indextool.gif'; var initialCollapse=true; // loop through all tables var t=document.getElementsByTagName('table'); var checktest= new RegExp("(^|\\s)" + collapseClass + "(\\s|$)"); for (var i=0;i<t.length;i++) {//欢迎来到站长特效网,我们的网址是www.zzjs.net,很好记,zz站长,js就是js特效,本站收集大量高质量js代码,还有许多广告代码下载。 // if the table has not the right class, skip it if(!checktest.test(t[i].className)){continue;} // make the footer clickable t[i].getElementsByTagName('tfoot')[0].onclick=function() { // loop through all bodies of this table and show or hide // them var tb=this.parentNode.getElementsByTagName('tbody'); for(var i=0;i<tb.length;i++) { tb[i].style.display=tb[i].style.display=='none'?'':'none'; } // change the image accordingly var li=this.getElementsByTagName('img')[0]; li.src=li.src.indexOf(collapsePic)==-1?collapsePic:expandPic; }//欢迎来到站长特效网,我们的网址是www.zzjs.net,很好记,zz站长,js就是js特效,本站收集大量高质量js代码,还有许多广告代码下载。 // if the bodies should be collapsed initially, do so if(initialCollapse) { var tb=t[i].getElementsByTagName('tbody'); for(var j=0;j<tb.length;j++) { tb[j].style.display='none'; } } // add the image surrounded by a dummy link to allow keyboard // access to the last cell in the footer var newa=document.createElement('a'); newa.href='#'; newa.onclick=function(){return false;} var newimg=document.createElement('img'); newimg.src=initialCollapse?expandPic:collapsePic; var tf=t[i].getElementsByTagName('tfoot')[0]; var lt=tf.getElementsByTagName('td')[tf.getElementsByTagName('td').length-1]; newa.appendChild(newimg); lt.insertBefore(newa,lt.firstChild); } }//欢迎来到站长特效网,我们的网址是www.zzjs.net,很好记,zz站长,js就是js特效,本站收集大量高质量js代码,还有许多广告代码下载。 // run tablecollapse when the page loads window.onload=tablecollapse; </script> <style type="text/css"> body{ font-family:Arial,Sans-Serif; font-size:90%; background:#cc9; } #boundary{ background:#f8f8f8; padding:2em; width:40em; } h1{ font-family:"Trebuchet MS",Sans-serif; text-transform:uppercase; color:#696; font-size:120%; } table.footcollapse{ width:30em; } table.footcollapse caption{ font-size:120%; text-transform:uppercase; text-align:left; padding:.5em 1em; } table.footcollapse th{ text-align:left; } table.footcollapse,table.footcollapse th,table.footcollapse th { border:none; border-collapse:collapse; } table.footcollapse thead th { width:10em; border-style:solid; border-width:1px; border-color:#cff #69c #69c #cff; background:#9cf; padding:2px 10px; } table.footcollapse tfoot th, table.footcollapse tfoot td { border-style:solid; border-width:1px; border-color:#9cf #369 #369 #9cf; background:#69c; padding:2px 10px; } table.footcollapse tbody{ background:#ddd; } table.footcollapse tbody td{ padding:5px 10px; border:1px solid #999; } table.footcollapse tbody th{ padding:2px 10px; border:1px solid #999; border-left:none; } table.footcollapse tbody tr.odd{ background:#ccc; } table.footcollapse tfoot td img{ border:none; vertical-align:bottom; padding-left:10px; float:right; } </style> </head> <body> <a href="<#ZC_BLOG_HOST#>">站长特效网</a>,站
上一篇:狡猾的按钮特效
下一篇:关闭页面后弹出提示层
免责声明:
本文仅代表作者个人观点,与爱易网无关。其原创性以及文中陈述文字和内容未经本站证实,对本文以及其中全部或者部分内容、文字的真实性、完整性、及时性本站不作任何保证或承诺,请读者仅作参考,并请自行核实相关内容。
相关资料
更多>
富士康人事故骚动方寸 不惜血本下注电商
Facebook财报前瞻:投资者仍信心不足
屌丝程序猿发家机会来了 用大数据来做生意!
称产品遭诋毁 奇虎再诉百度
支付宝钱包支持医保移动缴费 广州成首个试点
诺基亚若没加入微软,只不过是另一个HTC而已
一个非脑残米粉的思考:小米“成功之道”如何炼成
京东进驻微信一级入口或影响自身战略布局
创维冲击500亿梦想:转型硬件和内容供应商
推荐阅读
更多>
微软的云服务显示出他们将自我进化
巨人网络回应央视 否认应用黑客停止诈骗
搜房网遭遇做空 利益保送成“猎杀”焦点
微软很“捉急”:补贴Win8 重加末尾按钮
固话上网卡或将实名制 运营商泄露用户信息将被罚
“合聚变”来了 UC优视确认并入阿里巴巴
史玉柱此刻离任:营销巨匠为新游戏炒作?
英特尔承认,联想最新K系列智能手机放弃英特尔处理器
FDD牌照短期不会发放 联通电信暗自提速建网
众贷网满月开张 网络金融监管再受质疑
Twitter收购印度手机营销公司ZipDial
史玉柱卸任巨人网络CEO 继位人选引猜想
同样的背景,罗永浩和雷军到底有什么不同?
支付宝全面封杀比特币:充值码淘宝店或遭封禁
惠普董事长莱恩辞职 为巨额财务减记埋单
工信部或本月17日向联通电信颁发FDD牌照
Facebook财报前瞻:投资者仍信心不足
易信工具性优势突出 丁磊三板斧或先砍在飞信上
支付宝服务窗后台首曝光 开放用户消费数据
美图手机2问世 三大问题令其市场销量堪忧