一个从属于某一表单的动态表格,想在新加入行的时候实现对上一行输入的继承?请问如何实现?
解决方案 »
- 求教百度地图删除标注功能!用<a href='#' onclick=''>删除</a>调用删除!在线等!!
- EXTJS MVC 使用AjaxProxy与“api”配置选项来支持不同store Url的读取和修改
- JS菜鸟求助~~~
- 问一个关于两个菜单值的承接并显示为默认值
- 如何计算中文、英文、数字、空格的字符像素宽度?js、asp问题向大侠求助!!
- parseInt(32.6)为什么是32而不是33
- javascript画线、区域问题?急!求大家了!
- 求教如何解决IE执行Javascript时不稳定,导致崩溃的问题?
- 用正则表达式怎样匹配正反斜杠??
- 在一个用window.open打开的无statu,location,toolbars的窗口中,点击超链接后要求在原窗口中打开,但又要恢复窗口的status,location,toolbar.不知如何实现
- 请问怎么用javascript打开一个保存文件的对话框
- 请教高手解决难题:如何让网页中的某个表格或图片置顶在桌面上
newcell.innerHTML = otr.cells[i].innerHTML
<script language="JavaScript">
<!--
function _add(){
var otbl = document.getElementById('otbl');
var onewRow = otbl.rows[0].cloneNode(true);
otbl.lastChild.appendChild(onewRow);
}
//-->
</script>
<table id="otbl">
<tr>
<td><input type="text" ></td>
<td>12</td>
<td>13</td>
</tr>
</table>
<input type="button" value="add" onclick="_add()">
让红色行的代码直接代入那个值?
function insertRow(TableName){
var otr=TableName.insertRow(TableName.rows.length);
var ocell=otr.insertCell(0);
ocell.innerHTML="<tr><td align=center><input type=text size=8 name='channelno'+a+''></td>"
var ocell=otr.insertCell(1);
ocell.innerHTML=document.getElementById("td_Position").outerHTML;
var ocell=otr.insertCell(2);
ocell.innerHTML="<td><input type=text size=15 name='content'+a+''></td>"
var ocell=otr.insertCell(3);
ocell.innerHTML="<td><input type=text size=10 name='hpf'+a+''></td>" var ocell=otr.insertCell(4);
hpf=document.getElementName('hpf');
ocell.innerHTML="<td><input type=text size=10 name='lpf'+a+''value='+hpf+'></td>"
var ocell=otr.insertCell(5);
ocell.innerHTML="<td><input type=text size=5 name='amplifier'+a+''>"
var ocell=otr.insertCell(6);
ocell.innerHTML=document.getElementById("amp_unit").outerHTML;
if (TableName!="ThreeTable"){
var ocell=otr.insertCell(7);
ocell.innerHTML="<input type=button name='del'+a+'' value=Delete onclick=event.srcElement.parentNode.parentNode.parentNode.deleteRow(event.srcElement.parentElement.parentElement.rowIndex)></td></tr>"}else{;}
i++;
a++;
}