JavaScript -- Table
-----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的更多相关文章
- JavaScript Table行定位效果
作者:cloudgamer 时间: 2009-09-17 文档类型:原创 来自:蓝色理想 第 1 页 JavaScript Table行定位效果 [1] 第 2 页 JavaScript Table行 ...
- [TimLinux] JavaScript table的td内容超过宽度缩为三个点
1. 思路 CSS控制td内容自动缩为三个点 JS控制鼠标悬浮显示td全部内容 2. 实现 HTML代码: <!DOCTYPE html> <html> <head> ...
- javascript table排序之jquery.tablesorter.js
table排序 jquery.tablesorter.js 一.Demo下载地址: 1.tablesorter.js下载地址: http://download.csdn.net/detail/zhan ...
- table不能遗露了tbody
1.假如创建一个空表 ,然后去设置它的innerHTML,并获取表单的高度:在ie10及其他的浏览器中,会像预期一样正常被解析出来: <!DOCTYPE html> <html> ...
- BootStrap的table技术小结:数据填充、分页、列宽可拖动
本文结构:先说明,后代码.拷贝可直接运行. 一.demo结构: 二.文件引入 这些里面除了下面2个比较难找,其他的都很好找 bootstrap-table-resizable.js colResiza ...
- jQuery 的 live() 方法对 hover 事件的处理
因为hover不是标准的事件,因此无法直接使用live进行处理,故使用以下方法代替,效果一样 <script type="text/javascript"> $(&qu ...
- s标签s:if和s:set实现一个表格显示为多个表格
1.首先本来这个表格是这样的 2.这时候代码是这样的 <table cellpadding="4"> <tr> <th>指标点</th&g ...
- WEB打印控件Lodop使用体会
控件的使用方法,作者都已经有详细的使用说明供使用者参考. 但是对于打印表格,确实出现一点小问题,如果表格是自然高度,也就是只设置了table的高度,此时是可以正常显示的 ...
- bootstrap表格插件——Bootstrap-Table
注:本文引用自:http://www.cnblogs.com/wuhuacong/p/7284420.html 一.概述 1.是什么 是一个基于bootstrap的灌数据式的表格插件 2.能干什么 可 ...
随机推荐
- MIT Molecular Biology 笔记7 调控RNA
视频 https://www.bilibili.com/video/av7973580/ 教材 Molecular biology of the gene 7th edition J.D. Wat ...
- poj 2449 Remmarguts' Date【第K短路】
题目 题意:求 点s 到 点t 的 第 k 短 路的距离: 估价函数=当前值+当前位置到终点的距离 f(n)=g(n)+h(n); g(n)表示g当前从s到p所走的路径的长度, h( ...
- shell 中的 && 和 ||
shell 中的 && 和 || 简言之,shell 中 && --左边的命令执行成功才会执行右边的命令. || -- 左边的命令执行失败才会执行右边的命令.
- spring boot 整合 mybatis 以及原理
同上一篇文章一样,spring boot 整合 mybatis过程中没有看见SqlSessionFactory,sqlsession(sqlsessionTemplate),就连在spring框架整合 ...
- scikit-FEM-例2-用Morley元在方形区域上解板弯曲问题
""" Author: kinnala Solve the Kirchhoff plate bending problem in a unit square with c ...
- wordpress和数据库的连接
1.首先在数据库里创建wordpress数据库 2.在网页上配置WordPress,安装WordPress 如上配置不对,提交时提示了错误,于是我选择了root用户 123456, 3.提交后,连上了 ...
- Python自动化开发 - 流程控制
一.拾遗主题 1.变量 理解变量在计算机内存中的表示 >>> a = "ABC" Python解释器干了两件事情: 在内存中创建了一个'ABC'的字符串: 在内存 ...
- 如何让cxgrid既能充满又能根据内容进行宽度调整?
如何让cxgrid既能充满又能根据内容进行宽度调整? 原创 2009年02月25日 10:10:00 2793 1.选中cxgridview,在属性中找OptionsView--->ColumA ...
- 关于 cxGrid 的过滤问题
http://bbs.csdn.net/topics/390536919 关于 cxGrid 的过滤问题 [问题点数:20分,结帖人zhengyc653] 不显示删除回复 ...
- .Net Core Web应用发布至IIS后报“An error occurred while starting the application”错误
An error occurred while starting the application. .NET Core X64 v4.1.1.0 | Microsoft.AspNetCore ...