- 浏览: 88956 次
- 性别:
文章分类
- 全部博客 (151)
- Spring-MVC学习 (5)
- 偶然间发现 (2)
- easyUi学习 (7)
- web项目相关技术 (4)
- java学习 (26)
- webService (4)
- 一些工具的安装使用 (7)
- js学习 (20)
- Sping学习 (7)
- mybatis学习 (5)
- 定时器 (4)
- oracle (2)
- JSP学习 (6)
- HTML一些标签 (1)
- web服务 (2)
- 偶尔得到的地址 (2)
- 常用的代码记录 (2)
- 设计模式 (1)
- java常使用的开源API (1)
- maven (1)
- Socket (1)
- nginx (2)
- jquery (3)
- poi (2)
- 写过的工具类 (19)
- 微信开发 (2)
- mysql (1)
- freemarker (2)
- ftp (1)
- 用过的软件 (1)
- jconsole (1)
- log4j (1)
- redis的简单入门使用 java调用redis (0)
- redis的使用 (2)
- 生活相关的 (1)
最新评论
-
chokee:
...
easyUi学习之开启行编辑模式增删改操作 -
lijie_insist:
就是有的界面需要显示天气啊!所以你要调用天气的接口啊 因为很多 ...
免费的天气接口的一个demo -
zhglance:
请问这是干什么用的呢?
免费的天气接口的一个demo
Table,TableHeader,TableRow,TableData对象
更改表格边缘宽度代码来自w3school
ps:TableRow应该就是tr标签,TableData应该就是td标签,tableHeader应该是th标签,这也是我的推测,没去研究,反正知道怎么用就Ok了,哎!感觉自己不求甚解啊!
更改表格cellPadding和cellSpacing代码来自w3school
ps:cellPadding是td与tr之间的间隙,cellSpacing是tr与table之间的间隙,个人感觉效果就是这样的,不知道解释错了没,自己可以测一下,免得我误人子弟,毁人前途
规定表格的外部边框代码来自w3school
规定表格的内部边框代码来自w3school
显示表格的第一行的innerHtml代码来自w3school
表格单元的InnterHtml代码来自w3school
为表格创建标题代码来自w3school
从表格删除行代码来自w3school
向表格添加新行,然后向其添加内容代码来自w3school
向一个已有的行中插入单元格代码来自w3school
对齐行中的单元格内容代码来自w3school
垂直对齐行中的单元格内容代码来自w3school
对齐单元格中的内容代码来自w3school
垂直对齐单元格中的内容代码来自w3school
改变表格单元格中的内容代码来自w3school
更改表格横跨的列数代码来自w3school
更改表格边缘宽度代码来自w3school
ps:TableRow应该就是tr标签,TableData应该就是td标签,tableHeader应该是th标签,这也是我的推测,没去研究,反正知道怎么用就Ok了,哎!感觉自己不求甚解啊!
<html> <head> <script type="text/javascript"> function changeBorder() { document.getElementById('myTable').border="10" } </script> </head> <body> <table border="1" id="myTable"> <tr> <td>100</td> <td>200</td> </tr> <tr> <td>300</td> <td>400</td> </tr> </table> <br /> <input type="button" onclick="changeBorder()" value="改变边框"> </body> </html>
更改表格cellPadding和cellSpacing代码来自w3school
<html> <head> <script type="text/javascript"> function padding() { document.getElementById('myTable').cellPadding="15" } function spacing() { document.getElementById('myTable').cellSpacing="15" } </script> </head> <body> <table id="myTable" border="1"> <tr> <td>100</td> <td>200</td> </tr> <tr> <td>300</td> <td>400</td> </tr> </table> <br /> <input type="button" onclick="padding()" value="改变 Cellpadding"> <input type="button" onclick="spacing()" value="改变 Cellspacing"> </body> </html>
ps:cellPadding是td与tr之间的间隙,cellSpacing是tr与table之间的间隙,个人感觉效果就是这样的,不知道解释错了没,自己可以测一下,免得我误人子弟,毁人前途
规定表格的外部边框代码来自w3school
<html> <head> <script type="text/javascript"> function aboveFrames() { document.getElementById('myTable').frame="above" } function belowFrames() { document.getElementById('myTable').frame="below" } </script> </head> <body> <table id="myTable"> <tr> <td>100</td> <td>200</td> </tr> <tr> <td>300</td> <td>400</td> </tr> </table> <br /> <input type="button" onclick="aboveFrames()" value="显示上边框"> <input type="button" onclick="belowFrames()" value="显示下边框"> </body> </html>
规定表格的内部边框代码来自w3school
<html> <head> <script type="text/javascript"> function rowRules() { document.getElementById('myTable').rules="rows" } function colRules() { document.getElementById('myTable').rules="cols" } </script> </head> <body> <table id="myTable" border="1"> <tr> <td>Row1 cell1</td> <td>Row1 cell2</td> </tr> <tr> <td>Row2 cell1</td> <td>Row2 cell2</td> </tr> <tr> <td>Row3 cell1</td> <td>Row3 cell2</td> </tr> </table> <br /> <input type="button" onclick="rowRules()" value="仅显示行边框"> <input type="button" onclick="colRules()" value="仅显示列边框"> </body> </html>
显示表格的第一行的innerHtml代码来自w3school
<html> <head> <script type="text/javascript"> function showRow() { alert(document.getElementById('myTable').rows[0].innerHTML) } </script> </head> <body> <table id="myTable" border="1"> <tr> <td>Row1 cell1</td> <td>Row1 cell2</td> </tr> <tr> <td>Row2 cell1</td> <td>Row2 cell2</td> </tr> <tr> <td>Row3 cell1</td> <td>Row3 cell2</td> </tr> </table> <br /> <input type="button" onclick="showRow()" value="显示第一行的 innerHTML"> </body> </html>
表格单元的InnterHtml代码来自w3school
<html> <head> <script type="text/javascript"> function cell() { var x=document.getElementById('myTable').rows[0].cells; alert(x[0].innerHTML); } </script> </head> <body> <table id="myTable" border="1"> <tr> <td>cell 1</td> <td>cell 2</td> </tr> <tr> <td>cell 3</td> <td>cell 4</td> </tr> </table> <br /> <input type="button" onclick="cell()" value="显示第一个单元"> </body> </html>
为表格创建标题代码来自w3school
<html> <head> <script type="text/javascript"> function createCaption() { var x=document.getElementById('myTable').createCaption() x.innerHTML="我的表格标题" } </script> </head> <body> <table id="myTable" border="1"> <tr> <td>Row1 cell1</td> <td>Row1 cell2</td> </tr> <tr> <td>Row2 cell1</td> <td>Row2 cell2</td> </tr> </table> <br /> <input type="button" onclick="createCaption()" value="创建标题"> </body> </html>
从表格删除行代码来自w3school
<html> <head> <script type="text/javascript"> function deleteRow(r) { var i=r.parentNode.parentNode.rowIndex document.getElementById('myTable').deleteRow(i) } </script> </head> <body> <table id="myTable" border="1"> <tr> <td>Row 1</td> <td><input type="button" value="删除" onclick="deleteRow(this)"></td> </tr> <tr> <td>Row 2</td> <td><input type="button" value="删除" onclick="deleteRow(this)"></td> </tr> <tr> <td>Row 3</td> <td><input type="button" value="删除" onclick="deleteRow(this)"></td> </tr> </table> </body> </html>
向表格添加新行,然后向其添加内容代码来自w3school
<html> <head> <script type="text/javascript"> function insRow() { var x=document.getElementById('myTable').insertRow(0) var y=x.insertCell(0) var z=x.insertCell(1) y.innerHTML="NEW CELL1" z.innerHTML="NEW CELL2" } </script> </head> <body> <table id="myTable" border="1"> <tr> <td>Row1 cell1</td> <td>Row1 cell2</td> </tr> <tr> <td>Row2 cell1</td> <td>Row2 cell2</td> </tr> <tr> <td>Row3 cell1</td> <td>Row3 cell2</td> </tr> </table> <br /> <input type="button" onclick="insRow()" value="插入行"> </body> </html>
向一个已有的行中插入单元格代码来自w3school
<html> <head> <script type="text/javascript"> function insCell() { var x=document.getElementById('tr2').insertCell(0) x.innerHTML="John" } </script> </head> <body> <table border="1"> <tr id="tr1"> <th>Firstname</th> <th>Lastname</th> </tr> <tr id="tr2"> <td>Peter</td> <td>Griffin</td> </tr> </table> <br /> <input type="button" onclick="insCell()" value="插入单元"> </body> </html>
对齐行中的单元格内容代码来自w3school
<html> <head> <script type="text/javascript"> function leftAlign() { document.getElementById('header').align="left"; } </script> </head> <body> <table width="100%" border="1"> <tr id="header"> <th>名</th> <th>姓</th> </tr> <tr> <td>John</td> <td>Adams</td> </tr> </table> <br /> <input type="button" onclick="leftAlign()" value="左对齐表格行" /> </body> </html>
垂直对齐行中的单元格内容代码来自w3school
<html> <head> <script type="text/javascript"> function topAlign() { document.getElementById('tr2').vAlign="top"; } </script> </head> <body> <table width="50%" border="1"> <tr id="tr1"> <th>名</th> <th>姓</th> <th>文本</th> </tr> <tr id="tr2"> <td>John</td> <td>Adams</td> <td>你们好。我是名字是 John Adams。 在本例中,我需要一段长的文本。 在本例中,我需要一段长的文本。 在本例中,我需要一段长的文本。</td> </tr> </table> <br /> <input type="button" onclick="topAlign()" value="上对齐表格行" /> </body> </html>
对齐单元格中的内容代码来自w3school
<html> <head> <script type="text/javascript"> function alignCell() { document.getElementById('td1').align="right" } </script> </head> <body> <table border="1"> <tr> <th>-----名-----</th> <th>-----姓-----</th> </tr> <tr> <td id="td1">John</td> <td>Adams</td> </tr> </table> <form> <input type="button" onclick="alignCell()" value="对齐 'John' 单元格" /> </form> </body> </html>
垂直对齐单元格中的内容代码来自w3school
<html> <head> <script type="text/javascript"> function topAlign() { document.getElementById('td1').vAlign="top"; document.getElementById('td2').vAlign="top"; document.getElementById('td3').vAlign="top"; } </script> </head> <body> <table width="50%" border="1"> <tr> <th>名</th> <th>姓</th> <th>文本</th> </tr> <tr> <td id="td1">John</td> <td id="td2">Adams</td> <td id="td3">你们好。我是名字是 John Adams。 在本例中,我需要一段长的文本。 在本例中,我需要一段长的文本。 在本例中,我需要一段长的文本。</td> </tr> </table> <br /> <input type="button" onclick="topAlign()" value="上对齐表格单元" /> </body> </html>
改变表格单元格中的内容代码来自w3school
<html> <head> <script type="text/javascript"> function changeContent() { var x=document.getElementById('myTable').rows[0].cells x[0].innerHTML="新的内容" } </script> </head> <body> <table id="myTable" border="1"> <tr> <td>Row1 cell1</td> <td>Row1 cell2</td> </tr> <tr> <td>Row2 cell1</td> <td>Row2 cell2</td> </tr> <tr> <td>Row3 cell1</td> <td>Row3 cell2</td> </tr> </table> <form> <input type="button" onclick="changeContent()" value="改变内容"> </form> </body> </html>
更改表格横跨的列数代码来自w3school
<html> <head> <script type="text/javascript"> function changeColSpan() { document.getElementById("td1").colSpan="2"; } </script> </head> <body> <table border="1"> <tr> <th>名</th> <th>姓</th> </tr> <tr> <td id="td1">John</td> <td id="td2">Adams</td> </tr> </table> <br /> <input type="button" onclick=changeColSpan() value="改变 colspan" /> </body> </html>
发表评论
-
*.location.href的使用
2015-12-01 11:49 375*.location.href 用法: t ... -
js前端传递时间段来倒计时
2015-11-20 12:14 598上班整合了下这个 需要 ... -
js倒计时
2015-11-03 08:29 251<html xmlns="http://www ... -
纯js发送ajax请求
2015-08-18 19:14 677每次都用jquery,这次要微信开发,用纯js的可能少加载点东 ... -
获取验证码
2015-08-14 17:57 0<!DOCTYPE html PUBLIC " ... -
jquery图片展示代码
2015-03-03 08:55 111一个图片展示的代码 -
js学习之java script使用
2015-03-12 14:21 394总算看完了HTML DOM相关的基础知识了,下面开始整理jav ... -
js学习之HTML DOM事件和导航
2014-12-15 15:45 461这两个内容差不多是w3school对HTML DOM的最后的介 ... -
js学习之HTML DOM的访问和修改
2014-12-15 15:22 417HTML DOM访问 坚持接着把w3chool上的实例学完,最 ... -
js学习之字符串中英文判断
2014-12-12 17:45 681之前写js时候要判断中英文,网上找了下,引用这位博友的第三种方 ... -
js学习之HTML DOM的一些基础概念
2014-12-10 10:57 371经过近一个星期,总算把 ... -
js学习之Window对象
2014-12-09 17:50 365Window对象 显示对话框代码来自w3school ... -
js学习之Option和Select对象以及screen对象
2014-12-08 09:06 371Option和Select对象 禁止并启用下拉框代码来自w ... -
js学习之Location 对象以及 Navigator对象
2014-12-08 08:44 510这两天一直看online小说,感觉太颓废了!作为一个毕业才一年 ... -
js学习之Frame、Frameset 以及 IFrame 对象和image对象
2014-12-05 09:45 482今天上班又不是很忙,接着学习js相关的东西,毕业后就没怎么学习 ... -
js学习之Event对象和Form对象以及Input对象
2014-12-03 14:41 663Event对象 光标的位置代码来自w3school & ... -
js学习之Anchor对象和Document对象
2014-12-03 09:37 411Anchor对象 失去焦点和获取焦点有时候自己总喜欢忘记,而 ... -
javascript/jquery判断是否为undefined或是null
2014-12-03 09:05 445转自:http://blog.csdn.net/dxnn520 ... -
页面一些树的加载库
2014-12-02 15:28 368(dhtmlxTree的demo) http://dhtmlx ... -
js一些有用的demo和网站
2014-12-02 10:06 381http://www.fullavatareditor.com ...
相关推荐
bootstrap-table-fixed-header.js bootstrap-table-fixed-header.css 用于实现bootstrap冻结表头
向下滑动UITableview 放大tableHeader 代码实现简单,逻辑清楚,可以自己学习并尝试实现
表头浮动(table header fixed).兼容性强
以实例的方式介绍了PLSQL Developer工具中Compare Table Data命令的使用
Table TableRow TableCell与Bom模型 与事件处理机制 与js 面向对象的基础;
Pivot Table Data Crunching
利用js技术和css技术实现比较好看使用的table表格,方便用来制作前端页面表格,可供参考学习或直接使用。
bootstrap-table实现 行拖拽 插件 jquery.tablednd.js bootstrap-table-reorder-rows.js bootstrap-table-reorder-rows.css
table-data
javascript 绘制表格table,可以固定首行,首列,其他内容滚动显示.兼容ie,firefox,chrome等浏览器.
Flutter实现Table跨行跨列
JS手动改变table的宽度,鼠标选中文字查询,例如浏览器自带的
table2excel.js 用于直接将table转换成Excel的js工具包
javascript 实现table展开折叠,table的th部分不变,下端的tr折叠
主要介绍了如何使用javascript来获取table中单元格,行的数据,属性等
资源提供js操作html、table导出生成excel文件,代码简介易懂
前端开源库-table-header表格标题,将标题添加到文本表格
data tabledata table
让表格视图UITableView的TableHeader和TableFooter可以使用AutoLayout进行布局
用于bootstrap数据表格的导出插件,在引入bootstrap其他主要js和css的前提下,再将bootstrap-table-export.js和tableExport.js引入。包里有两个版本的