<SCRIPT>
function insertElement(obj)
{
var nod=document.createElement("TD");
obj.insertBefore(nod);
nod.innerText="A New bold object has been inserted into the document."
}</SCRIPT>
<BODY>
<table width="600" border="1" cellspacing="0" cellpadding="0">
<tr>
<td onclick ="insertElement(this)">点这里加入一行。</td>
</tr>
</table>
</body>
function insertElement(obj)
{
var nod=document.createElement("TD");
obj.insertBefore(nod);
nod.innerText="A New bold object has been inserted into the document."
}</SCRIPT>
<BODY>
<table width="600" border="1" cellspacing="0" cellpadding="0">
<tr>
<td onclick ="insertElement(this)">点这里加入一行。</td>
</tr>
</table>
</body>
解决方案 »
- document.evaluate???的概念
- 如何将input type file设置为空真没分了
- 点击"复制代码" "运行代码" 求助不支持firefox
- js:错误对象不支持此属性或方法?
- 跨域问题:两个页面不在一个域下,iframe页面如何获得其父页面的URL?
- 这么小的问题都没有人来解答吗?再发一次 我在线等
- 有没有办法使 Confirm() 的对话框的焦点 落在 取消 按钮上???
- 如何把字符串"D$1,D$2,D$3.....n和T$1001,T$1002,T$1003......N"分离成"1,2,3;1001,1002,1003"?
- jquery 选择 select option 值。
- js 滑块
- 通过js判断输入是否为数字改如何写?
- 奇怪的问题,关于select的当前显示项
<tr>
<td onclick="this.innerHTML+=' <INPUT TYPE=button value=click>'">点这里加个东东</td>
</tr>
</table>
{
newRow=trafficeList.insertRow(trafficeList.rows.length);
newRow.id="tradt";
newRow.ln=allTrafficCount;
c1=newRow.insertCell(0);
c1.id="tradtRow";
c1.ln=allCount;
c1.innerHTML="<td><input type=text name='traffic' size=40 ></td><td><input type=button value='删除' ln=" + allTrafficCount + " onclick='javascript:delTrafficeRow();'></td>"//这里的td起不了作用啊
allTrafficCount++;
frm.trafficCount.value = allTrafficCount;为什么在c1.innerHTML中加入<td>就起不了作用啊??