标题:做系统时遇到的问题,请指教……
只看楼主
fengmumei
Rank: 2
等 级:论坛游民
威 望:2
帖 子:298
专家分:14
注 册:2006-9-16
得分:0 

以上图为例,点击“增加行”按钮会增加一行
function addNew()
{

var m1=0;
m1=parseInt(document.all.linenumber1.value);
n=m1+2;
tr=document.all.t136.insertRow();
tr.height=25;

with(tr.insertCell())
{
innerHTML='<input id="wpmc'+m1+'" name="wpmc'+m1+'"><br>';
width='170';align='center';}
with(tr.insertCell())
{
innerHTML='<select id="ggxh'+m1+'" name="ggxh'+m1+'"></select>;
width='130';align='center';}
with(tr.insertCell())
{
innerHTML='<input type=text name="jldw'+m1+'">';
width='70';align='center';}
with(tr.insertCell())
{
innerHTML='<input type=text name="zhijian'+m1+'" style="border=0; text-align:center;width:50" readonly >;
width='70';align='center';}
with(tr.insertCell())
{
innerHTML='<input type="text" id="shliang'+m1+'" name="shliang">';
width='125';align='right';}
with(tr.insertCell())
{
innerHTML='<input type="text" id="hsdj'+m1+'" name="hsdj">';
width='140';align='right';}

with(tr.insertCell())
{
innerHTML='<input type="text" id="zjiner'+m1+'" name="zjiner">';
width='140';align='right';}
with(tr.insertCell())
{
innerHTML='<input type="button" id="shanchu'+m1+'" name="shanchu" onclick=del() value="删">';
width='35';align='center';}
m1++;
b=document.getElementById("t136").rows.length-1;
document.all.linenumber.value=b;
document.all.linenumber1.value=m1;
}

随缘不变,不变随缘
2007-09-24 14:25
steven1013
Rank: 2
等 级:论坛游民
帖 子:132
专家分:20
注 册:2007-8-11
得分:0 
谢谢fengmumei,非常感谢!
我现在就根据这个思想调试……

2007-09-24 15:08



参与讨论请移步原网站贴子:https://bbs.bccn.net/thread-171984-1-1.html




关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 1.152419 second(s), 8 queries.
Copyright©2004-2025, BCCN.NET, All Rights Reserved