动态表格展示出来以后也就是静态的啦,可以根据ID取值的,如果没有ID,输出的时候就给一个,看一下前台代码就知道了,当然,这个功能要用JS实现了
解决方案 »
- 找一个Jquery 分页 插件
- 如何在asp.net网页中自做讯播播放器来看电影
- 用javascript可以实现图片的连续移动,而且不会留空白,但是图片大小,怎么弄呢?
- 问一个jquery的问题
- 大家看看这个是什么编码方式?怎么解码呢?
- 如何获取媒体文件的加载进度?
- ActiveXObject和CreateObject的问题
- 我用下面的代码使页面全屏,在800*600下成功,可是在1024下就不行了,怎么办?
- 一个Javascript的对象问题,困扰好几天了,请各位大侠帮忙看看:
- 关于"<Div id=''Menu''>" & chr(13)& chr(10)....
- 图层的显示与隐藏
- <script type="text/javascript" src="../chatcheck/li 直接在js文件里咋写
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>表格 </title>
<script type="text/javascript">
function copy() {
var obj = document.activeElement;
document.getElementById(parseInt(obj.id)+1).value = document.getElementById(parseInt(obj.id)-1).value;
}
var i = 0;
function createTable()
{
var tb = document.getElementById("tab").tBodies[0];
var row = tb.insertRow(0);
var cell = row.insertCell(0);
var ipt1 = document.createElement("input");
ipt1.id = i++;
ipt1.type = "text";
cell.appendChild(ipt1);
var ipt2 = document.createElement("input");
ipt2.id = i++;
ipt2.type = "button";
ipt2.value = "COPY";
ipt2.onclick = function() { copy(); };
cell = row.insertCell(1);
cell.appendChild(ipt2);
cell = row.insertCell(2);
ipt1 = document.createElement("input");
ipt1.id = i++;
ipt1.type = "text";
cell.appendChild(ipt1);
}
</script>
</head>
<body>
<button onclick="createTable()">添加行 </button>
<table border="1" id="tab">
</table>
</body>
</html>
function(){
var tr=ipt2.parentNode.parentNode;
tr.cells[2].childNodes[0].value =tr.cells[0].childNodes[0].value;
}
);