爱易网
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 浏览次数:20213 次
以下是程序代码
<!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>,站
上一篇:狡猾的按钮特效
下一篇:关闭页面后弹出提示层
免责声明:
本文仅代表作者个人观点,与爱易网无关。其原创性以及文中陈述文字和内容未经本站证实,对本文以及其中全部或者部分内容、文字的真实性、完整性、及时性本站不作任何保证或承诺,请读者仅作参考,并请自行核实相关内容。
相关资料
更多>
让一让,小米4来了,碰见米粉请务必绕道走!
纸媒深探版权蓝海抗衡互联网的时机到来了
中移动五大基地将整改成公司:被指易滋生腐败
欧盟控诉苹果在爱尔兰非法进行税收交易
苹果MacBook Air劣势渐显 或推新产品改变命运
迅雷欲3300万美元收购金山快盘 预计9月完成
余额宝收益率跌破5% 银行系宝宝收益率赶超
迅雷向美SEC提交IPO招股书:拟最多筹资1亿美元
柳传志马云陷舆论漩涡:请不要辜负这个时代
推荐阅读
更多>
亚马逊Fire Phone:请别拿我跟苹果三星比
完美入股盛大:一桩各怀心事的交易
柳传志马云陷舆论漩涡:请不要辜负这个时代
微软确认 Surface 计划更多尺寸和LTE 版本
苹果售后生态链乱象:供需失衡价钱不一
传谷歌开发者大会发布Android 4.3 并非5.0版本
网络音乐非片面收费 高晓松时间表难完成
虚拟运营商们更像三大运营商的“二道贩子”
神州电脑中止IPO面前:再被质疑财务造假
成本效益全兼顾 混合云市场前景显现
苹果收购Beats交易或将延期尚需解决5大问题
只有切到刚需痛点,漫画APP才能走下去
iPhone5S组件曝光 印证杀手级功能存在
微软觊觎移动互联市场:手机未出渠道先行
9月1日起免征新能源汽车购置税
华为美国推出电商网站 发售Mate 2LTE版
迅雷再次在美提交IPO申请
华为坚持不上市究竟为何?不差钱也不想冒风险
Facebook财报前瞻:投资者仍信心不足
同为70前后人,马云为什么总是像外星人那么瘦