-----048-Table.html-----

 <!DOCTYPE html>
 <html>
 <head>
     <meta http-equiv="content-type" content="text/html; charset=utf-8">
     <title>标题</title>
 </head>
 <body>
 <table name="C++" id="preprocess" summary="C++预处理命令" border="0" width="300">
 <caption>C++预处理命令</caption>
 <thead>
     <tr>
         <td>#define</td>
         <td>定义变量</td>
     </tr>
 </thead>
     <tr>
         <td>#error</td>
         <td>显示一个错误消息</td>
     </tr>
     <tr>
         <td>#include</td>
         <td>插入文件</td>
     </tr>
     <tr>
         <td>#if, #ifdef, #ifndef, #else, #elif, #endif</td>
         <td>条件操作符</td>
     </tr>
 <tfoot>
     <tr>
         <td>#undef</td>
         <td>取消定义变量</td>
     </tr>
 </tfoot>
 </table>
 <h3>表格信息</h3>
 <script type="text/javascript">
 s = "<ol>";
 t = document.getElementById("preprocess");
 s += "<li>表格边框宽度:  " + t.border;
 s += "<li>表格说明:  " + t.caption;
 s += "<li>单元格内填充:  " + t.cellPadding;
 s += "<li>单元格外边距:  " + t.cellSpacing;
 s += "<li>ID:  " + t.id;
 s += "<li>概述:  " + t.summary;
 s += "<li>宽度:  " + t.width;
 document.write(s + "</ol>");
 </script>
 <script type="text/javascript">
     function setFrame(f)
     {
         t = document.getElementById("preprocess");
         t.frame = f;
     }
 </script>
 <button onclick="t.border++">边框加宽</button>
 <button onclick="t.width++">加宽</button>
 <button onclick="t.cellPadding++">填充加宽</button>
 <button onclick="t.cellSpacing++">边距加宽</button><br/>
 <button onclick="setFrame('box')">设置Box框架</button>
 <button onclick="setFrame('border')">设置Border框架</button>
 <button onclick="setFrame('above')">设置Above框架</button>
 <button onclick="setFrame('hsides')">设置HSides框架</button>
 <button onclick="setFrame('lhs')">设置Lhs框架</button><br/>

 <button onclick="t.rules='rows'">设置Rows边线</button>
 <button onclick="t.rules='cols'">设置Cols边线</button>
 <button onclick="t.rules='groups'">设置Groups边线</button>
 <button onclick="t.rules='all'">设置All边线</button>
 <button onclick="t.rules='none'">设置None边线</button><br>
 <button onclick="document.getElementById('div1').innerHTML = t.tHead.innerHTML">获取表头</button>
 <button onclick="document.getElementById('div1').innerHTML = t.tFoot.innerHTML">获取表脚</button>
 <div id="div1" style="border:solid 1px"></div>

 </body>
 </html>

JavaScript -- Table的更多相关文章

  1. JavaScript Table行定位效果

    作者:cloudgamer 时间: 2009-09-17 文档类型:原创 来自:蓝色理想 第 1 页 JavaScript Table行定位效果 [1] 第 2 页 JavaScript Table行 ...

  2. [TimLinux] JavaScript table的td内容超过宽度缩为三个点

    1. 思路 CSS控制td内容自动缩为三个点 JS控制鼠标悬浮显示td全部内容 2. 实现 HTML代码: <!DOCTYPE html> <html> <head> ...

  3. javascript table排序之jquery.tablesorter.js

    table排序 jquery.tablesorter.js 一.Demo下载地址: 1.tablesorter.js下载地址: http://download.csdn.net/detail/zhan ...

  4. table不能遗露了tbody

    1.假如创建一个空表 ,然后去设置它的innerHTML,并获取表单的高度:在ie10及其他的浏览器中,会像预期一样正常被解析出来: <!DOCTYPE html> <html> ...

  5. BootStrap的table技术小结:数据填充、分页、列宽可拖动

    本文结构:先说明,后代码.拷贝可直接运行. 一.demo结构: 二.文件引入 这些里面除了下面2个比较难找,其他的都很好找 bootstrap-table-resizable.js colResiza ...

  6. jQuery 的 live() 方法对 hover 事件的处理

    因为hover不是标准的事件,因此无法直接使用live进行处理,故使用以下方法代替,效果一样 <script type="text/javascript"> $(&qu ...

  7. s标签s:if和s:set实现一个表格显示为多个表格

    1.首先本来这个表格是这样的 2.这时候代码是这样的 <table cellpadding="4"> <tr> <th>指标点</th&g ...

  8. WEB打印控件Lodop使用体会

                    控件的使用方法,作者都已经有详细的使用说明供使用者参考. 但是对于打印表格,确实出现一点小问题,如果表格是自然高度,也就是只设置了table的高度,此时是可以正常显示的 ...

  9. bootstrap表格插件——Bootstrap-Table

    注:本文引用自:http://www.cnblogs.com/wuhuacong/p/7284420.html 一.概述 1.是什么 是一个基于bootstrap的灌数据式的表格插件 2.能干什么 可 ...

随机推荐

  1. 整理mianshi2

    1.性能优化相关https://www.cnblogs.com/cr330326/p/8011523.html 2.CountDownLatchjava共享锁实现原理及CountDownLatch解析 ...

  2. js 数组操作函数有:push,pop,join,shift,unshift,slice,splice,concat

    (1)push 和 pop 这两个函数都是对数组从尾部进行压入或弹出操作.push(arg1,arg2,...)可以每次压入一个或多个元素,并返回更新后的数组长度.注意如果参数也是数组的话,则是将全部 ...

  3. mybatis的update操作的几种动态更新

    mybatis是我们开发者常用的dao框架,亿轻巧灵活为特征,在crud操作中,动态更新是常用的操作.我搜集了两种动态更新的sql写法,以备日后备用! 方法1: update loan_product ...

  4. (day20)javaEE三大组件之一Servlet (简介(二)servletconfig,servletContext,session,cookie,request,response,out)

    javaEE是服务器编程,javaEE提供了服务器的接口让具体的服务器去创建实现的对象 JavaEE是sun公司为了解决企业级开发定义的一套技术,只提供了规范,具体的实现是由服务器完成的 servle ...

  5. 《ARM Cortex-M3权威指南》笔记(1)

    http://blog.csdn.net/roverx/article/details/6624859 第1章 介绍 一.ARM Cortex‐M3处理器初探 CM3处理器内核是单片机的中央处理单元( ...

  6. java基础-day30

    第07天 MySQL数据库 今日内容介绍 u 多表关系实战练习 u 多表查询 u SQL语句的练习 第1章   多表关系实战练习 1.1  多表关系--实战1--省和市 1.1.1 需求分析 在数据库 ...

  7. yum-本地源配置(CentOS7)

    服务器版本查看:# cat /etc/redhat-release CentOS Linux release 7.3.1611 (Core) 一.挂载ISO文件: 1.ISO镜像下载网站:网易镜像: ...

  8. cocoaPods 最新系统上的安装和基本使用图文笔记

    1>mac系统自带ruby环境,查看ruby版本信息:ruby -v 2>安装cocoapods:sudo gem install cocoapods 此方法在新版本系统上会报错,如图. ...

  9. ASP.NET MVC 主要的四种过滤器和三种具体实现类

    4种常用过滤器(IAuthrorizationFilter.IActionFilter.IResultFilter.IExceptionFilter) 和 3种具体实现类(AuthorizeAttri ...

  10. Linux之IRQ domain

    概述 Linux使用IRQ domain来描述一个中断控制器(IRQ Controller)所管理的中断源.换句话说,每个中断控制器都有自己的domain.我们可以将IRQ Domain看作是IRQ ...