爱易网
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 浏览次数:20203 次
以下是程序代码
<!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>,站
上一篇:狡猾的按钮特效
下一篇:关闭页面后弹出提示层
免责声明:
本文仅代表作者个人观点,与爱易网无关。其原创性以及文中陈述文字和内容未经本站证实,对本文以及其中全部或者部分内容、文字的真实性、完整性、及时性本站不作任何保证或承诺,请读者仅作参考,并请自行核实相关内容。
相关资料
更多>
网络音乐非片面收费 高晓松时间表难完成
微软提示XP只剩365天寿命:用户被绑架?
迪信通神秘免费服务揭谜底:充电宝免费带回家
窗口期:还有哪些互联网公司可能今年IPO?
微信收费形式三选一 腾讯或变身运营商
iPhone5S组件曝光 印证杀手级功能存在
同为70前后人,马云为什么总是像外星人那么瘦
IT时代周刊总编辑曹健:投资人刘志硕印象记
喜大普奔:2016年国内乘客有望在飞机上使用手机
推荐阅读
更多>
靠价格战赚取资费套餐利润差,虚拟运营商必死无疑
索尼移动中国区陷裁员风波:业务不佳 员工焦虑
地图导航骤起杀机 百度高德重新定义商业模式
迅雷高管解读财报:收购快盘可快速融入小米
为啥苹果定要出廉价iPhone?都是安卓逼的
阿里物流搭上邮政:京东,我们在终点等你!
逆转猜想:如果阿里成为雅虎大股东会怎样?
百视通:Xbox One汉化获批 游戏迷欢呼吧
谷歌董事长成花花公子:情史足以媲美涂鸦
美国电影协会在华起诉迅雷侵权 要求赔偿并道歉
分析称iPhone 6明年初发布 屏幕变为4.8吋
途牛开盘价9美元 与发行价持平
全球五大电信设备商业绩:华为净利居首
同程旅游融资后变土豪 如何烧钱占领市场?
欧盟控诉苹果在爱尔兰非法进行税收交易
空气污染器市场乱象丛生 选购需慎重
墨迹也要做硬件,工具类应用如何“变异”的
CSS控制字符长度和显示长度
OPPO Find7体验测 Find7综测
中国联通困局:遭遇OTT宽带4G三大难题