-----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. spring boot和mybatis入门

    [size=x-large]昨天讲了一下spring boot的入门操作相信老手已经明白入门的操作,今天我来讲下我自己的心得,可能与官方有一定差异:希望对大家能有用 一:开门见山首先看工程结构 这里的 ...

  2. (转)Tomcat(java运行环境)安装及配置教程

    转自:http://jingyan.baidu.com/article/870c6fc33e62bcb03fe4be90.html 用来进行web开发的工具有很多,Tomcat是其中一个开源的且免费的 ...

  3. (转) HighCharts 非规律日期 多条曲线的 绘画

    转自:http://blog.csdn.net/z69183787/article/details/8651296 项目中需要为A,B 2个元素 绘出统计值的曲线,但A与B 的 时间点 并不一致,查找 ...

  4. 20169207《Linux内核原理与分析》第五周作业

    这周的任务主要分为两个方面,第一方面,学习MOOC网上视频第三讲并完成配套的实验.第二方面,学习课本的第四章和第六章. 首先从实验开始讲起,前期我们对Linux内核的源码做了一个简单的了解.包括Mai ...

  5. java中三种注释

    //单行注释 /* 多行注释 */ /** * 文档注释 * version 2018.10.25 * authou GMY */

  6. CSS 基础 例子 背景色 & 背景图片

    背景简写形式 : body {background:#ffffff url('img_tree.png') no-repeat right top;} 一.背景色  background-color ...

  7. B - Big String

    We will construct an infinitely long string from two short strings: A = "^__^" (four chara ...

  8. 有人在用fastReport作报表时处理过字体自动缩小的问题吗,怎么做

    有人在用fastReport作报表时处理过字体自动缩小的问题吗,怎么做  我来答   浏览 49 次 1个回答 #吃瓜大会# Angelababy演技被吐槽, 你觉得她的演技怎么样? 最佳答案 热心 ...

  9. 取得cxgrid的表格的值,仔细看下面的代码

    procedure TfrmMain.cxGridDBTableView_List_PSSJCustomDrawCell(Sender: TcxCustomGridTableView; ACanvas ...

  10. 动态设置和访问cxgrid列的Properties

    动态设置和访问cxgrid列的Properties   设置: cxGrid1DBTableView1Column.PropertiesClass   =   TcxTextEditPropertie ...