使用DOM创建表格的完整流程
2015-12-30 18:12
441 查看
1.创建表:
var table=document.createElement("table");
2.创建表头:
var thead=table.createTHead();
var tr=thead.insertRow();//插入行
var th.createElement("th");
th.innerHTML=??;
tr.appendChild(th);
3.创建表体:
var tbody=table.createTBody();
var tr=tbody.insertRow();
var td=tr.insertCell();//插入表格
var table=document.createElement("table");
2.创建表头:
var thead=table.createTHead();
var tr=thead.insertRow();//插入行
var th.createElement("th");
th.innerHTML=??;
tr.appendChild(th);
3.创建表体:
var tbody=table.createTBody();
var tr=tbody.insertRow();
var td=tr.insertCell();//插入表格
相关文章推荐
- 豌豆夹Redis解决方案Codis安装使用
- 关于jsp跳转简单总结
- 解读代码系统-具有定制列表项的用户界面
- 【JavaWeb Structs2学习】 路径介绍(在JSP页面a标签怎么写1)
- 处理other people游戏代码
- YUV Formats
- 使用Java导出Excel案例详解
- VC++6.0显示cannot compile the file***:no compile tool is associated with the file extension.
- 用例分析技术阅读笔记一
- javascript中的Array对象属性和方法整理
- 将MYSQL数据文件拷贝到使用LVM扩容的磁盘中
- sharding-ids-at-instagram
- android studio实现Jni(C/C++)单步调试方法步骤-标准配置教程
- Linux下mysql数据库备份
- Linux resuce救援模式下修复系统
- C#之读取XML文件内容
- Keymob:移动广告的潜力无限
- jquery ezUI 双击行记录弹窗查看明细
- 详解YUV数据格式
- iOS之新建工程上下出现黑色块