可编辑的表格页面代码实现
2017-04-16 14:01
316 查看
有时候需要用代码编写在客户端网页中可编辑的表格以输入数据提交给后台数据库,做了一个小小的demo,效果图:
代码部分:
<div class="BMform">
<form action="#">
<table class="baoM">
<h1 class="title">第十三届“理想杯”计算机技能大赛报名表</h1>
<tr>
<td scope="row" width="150px">负责人姓名</td>
<td class="fuNa" colspan="2" height="30px"><input type="text" class="fuNa" /></td>
<td width="100px">年级</td>
<td class="fuNa" colspan="2"><input type="text" class="fuNa"/></td>
</tr>
<tr>
<td scope="row">电话</td>
<td class="fuNa" colspan="2"><input type="text" class="fuNa"/></td>
<td>QQ</td>
<td class="fuNa" colspan="2"><input type="text" class="fuNa"/></td>
</tr>
<tr>
<td scope="row">项目名称</td>
<td class="xiNa" colspan="4"><input type="text" class="xiNa"/></td>
</tr>
<tr>
<td scope="row">项目类别</td>
<td class="xiNa" colspan="4"><input type="text" class="xiNa"/></td>
</tr>
<tr>
<td scope="row" rowspan="3">小组成员</td>
<td scope="row" width="100px">姓名</td>
<td class="zuNa"><input type="text" class="zuNa"/></td>
<td scope="row" width="100px">年级</td>
<td class="zuNa"><input type="text" class="zuNa"/></td>
</tr>
<tr>
<!--<td scope="row">小组成员</td>-->
<td scope="row">姓名</td>
<td class="zuNa"><input type="text" class="zuNa"/></td>
<td scope="row">年级</td>
<td class="zuNa"><input type="text" class="zuNa"/></td>
</tr>
<tr>
<!--<td scope="row">小组成员</td>-->
<td scope="row">姓名</td>
<td class="zuNa"><input type="text" class="zuNa"/></td>
<td scope="row">年级</td>
<td class="zuNa"><input type="text" class="zuNa"/></td>
</tr>
<tr>
<td scope="row">备注</td>
<td class="xiNa" colspan="4"><input type="text"class="xiNa"/></td>
</tr>
</table>
</form>
</div>
css:
table.baoM{
width: 960px;
border-collapse:collapse;
}
table.baoM h1{
text-align:left;
padding-bottom:6px;
}
table.baoM td{
height: 40px;
line-height: 40px;
margin:0px;
padding:0px;
font-family: "仿宋";
font-size: 18px;
text-align:center;
line-height: 40px;
border:1px solid #ABABAB;
}
table.baoM input{ /*可输入区域样式*/
display: inline-block;
width:100%;
height: 40px;
line-height: 40px;
margin:0;
padding: 0;
border:none;
background: none;
}
代码部分:
<div class="BMform">
<form action="#">
<table class="baoM">
<h1 class="title">第十三届“理想杯”计算机技能大赛报名表</h1>
<tr>
<td scope="row" width="150px">负责人姓名</td>
<td class="fuNa" colspan="2" height="30px"><input type="text" class="fuNa" /></td>
<td width="100px">年级</td>
<td class="fuNa" colspan="2"><input type="text" class="fuNa"/></td>
</tr>
<tr>
<td scope="row">电话</td>
<td class="fuNa" colspan="2"><input type="text" class="fuNa"/></td>
<td>QQ</td>
<td class="fuNa" colspan="2"><input type="text" class="fuNa"/></td>
</tr>
<tr>
<td scope="row">项目名称</td>
<td class="xiNa" colspan="4"><input type="text" class="xiNa"/></td>
</tr>
<tr>
<td scope="row">项目类别</td>
<td class="xiNa" colspan="4"><input type="text" class="xiNa"/></td>
</tr>
<tr>
<td scope="row" rowspan="3">小组成员</td>
<td scope="row" width="100px">姓名</td>
<td class="zuNa"><input type="text" class="zuNa"/></td>
<td scope="row" width="100px">年级</td>
<td class="zuNa"><input type="text" class="zuNa"/></td>
</tr>
<tr>
<!--<td scope="row">小组成员</td>-->
<td scope="row">姓名</td>
<td class="zuNa"><input type="text" class="zuNa"/></td>
<td scope="row">年级</td>
<td class="zuNa"><input type="text" class="zuNa"/></td>
</tr>
<tr>
<!--<td scope="row">小组成员</td>-->
<td scope="row">姓名</td>
<td class="zuNa"><input type="text" class="zuNa"/></td>
<td scope="row">年级</td>
<td class="zuNa"><input type="text" class="zuNa"/></td>
</tr>
<tr>
<td scope="row">备注</td>
<td class="xiNa" colspan="4"><input type="text"class="xiNa"/></td>
</tr>
</table>
</form>
</div>
css:
table.baoM{
width: 960px;
border-collapse:collapse;
}
table.baoM h1{
text-align:left;
padding-bottom:6px;
}
table.baoM td{
height: 40px;
line-height: 40px;
margin:0px;
padding:0px;
font-family: "仿宋";
font-size: 18px;
text-align:center;
line-height: 40px;
border:1px solid #ABABAB;
}
table.baoM input{ /*可输入区域样式*/
display: inline-block;
width:100%;
height: 40px;
line-height: 40px;
margin:0;
padding: 0;
border:none;
background: none;
}
相关文章推荐
- jQuery EasyUI中对表格进行编辑的实现代码
- jQuery EasyUI中对表格进行编辑的实现代码
- jQuery(非HTML5)可编辑表格实现代码
- jQuery EasyUI中对表格进行编辑的实现代码
- jQuery仿Excel表格编辑功能的实现代码
- 用JS实现动态删除表格行、列、双击编辑的代码
- jQuery代码实现表格内容可编辑修改
- jQuery实现可编辑表格并生成json结果(实例代码)
- jQuery EasyUI中对表格进行编辑的实现代码
- jQuery EasyUI中对表格进行编辑的实现代码
- 使用html来定制编辑页面,不需要写代码就可以实现业务处理的界面
- jQuery仿Excel表格编辑功能的实现代码
- jQuery EasyUI中对表格进行编辑的实现代码
- jQuery(非HTML5)可编辑表格实现代码
- JavaScript实现在线编辑表格
- AjaxPanel自定义控件实现页面无刷新数据交互(做了个示例程序, 效果确实比较Cool, 用法非常简单! )(示例代码下载)
- AjaxPanel自定义控件实现页面无刷新数据交互(做了个示例程序, 效果确实比较Cool, 用法非常简单! )(示例代码下载)
- Ajax实现智能表格(适合B/S模式项目的录入页面)