问题描述
functiononchecks(){vartr1=document.getElementById("tb").insertRow();vartd1=tr1.insertCell();td1.width="100px";td1.align="center";td1.innerHTML="<select><%out.print(opType);%></select>";vartd2=tr1.insertCell();td2.width="100px";td2.align="center";td2.innerHTML="<select><%out.print(opTypee);%></select>";vartd3=tr1.insertCell();td3.width="100px";td3.align="center";td3.innerHTML="<select><%out.print(opTypeee);%></select>";vartd4=tr1.insertCell();td4.width="100px";td4.align="center";td4.innerHTML="<inputname="bankacc"type="text"id="bankacc"onkeyup="this.value=this.value.replace(/D/g,'')"onafterpaste="this.value=this.value.replace(/D/g,'')"/>";}<inputtype="button"value="添加行"onclick="onchecks();"><tableid="tb"width="100%"border="1"cellspacing="0"cellpadding="1"style="filter:Alpha(opacity=65)"><tr><tdwidth="20%"align="center";>类型</td><tdwidth="20%"align="center";>部门</td><tdwidth="20%"align="center";>产品</td><tdwidth="20%"align="center";>标准值</td><tr></table><inputtype="button"value="提交"><inputname="bankacc"type="text"id="bankacc"onkeyup="this.value=this.value.replace(/D/g,'')"onafterpaste="this.value=this.value.replace(/D/g,'')"/>添加tr我要里面的td4.innerHTML="<inputname="bankacc"type="text"id="bankacc"onkeyup="this.value=this.value.replace(/D/g,'')"onafterpaste="this.value=this.value.replace(/D/g,'')"/>";实现请求高手帮忙啊谢谢谢谢谢谢
解决方案
解决方案二:
没人吗55555555555555555555555555
解决方案三:
我这有一个添加行的函数你可以看一下functioninsertRow(){varobjRow=CommidityGrid.insertRow();RowNum++;vari=RowNum;Form1.rownum.value=i;objRow.id="GridRow"+i;varaaaa1="1";varaaaa2='1';varobjCel1=objRow.insertCell(0);objCel1.innerHTML='<inputtype="text"style="width:100%"name="PyOrdNum'+(i)+'"class="ClientTableflateditbox"onclick="GridSelectTree('+(i)+')">';varobjCel2=objRow.insertCell(1);objCel2.innerHTML='<inputtype="text"style="width:100%"name="PyOrdName'+(i)+'"class="ClientTableflateditbox"onclick="GridSelectTree('+(i)+')">';varobjCel3=objRow.insertCell(2);objCel3.innerHTML='<inputtype="text"style="width:100%"name="PyOrdAd'+(i)+'"class="ClientTableflateditbox"onclick="GridSelectTree('+(i)+')">';varobjCel4=objRow.insertCell(3);objCel4.innerHTML='<inputtype="text"style="width:100%"name="PyOrdGg'+(i)+'"class="ClientTableflateditbox"onclick="GridSelectTree('+(i)+')">';varobjCel5=objRow.insertCell(4);objCel5.innerHTML='<selectsize="1"name="PyOrdDw'+(i)+'"style="width:80px;font-size:12px"onchange="javascript:zhjs('+(i)+');pri('+(i)+');"><optionvalue=""> </option></select>';objCel5.align="center";varobjCel6=objRow.insertCell(5);objCel6.innerHTML='<inputtype="text"style="width:100%"name="PyOrdPrice'+(i)+'"class="ClientTableflateditbox"onBlur="bgmon(this.value,'+(i)+');SPrice('+(i)+');"onkeydown="myKeyDown2();"onclick="this.select();">'+'<inputtype="hidden"name="h_ysPrice'+(i)+'">';varobjCel7=objRow.insertCell(6);objCel7.innerHTML='<inputtype="text"style="width:100%"name="PyOrdCount'+(i)+'"class="ClientTableflateditbox"onchange="javascript:zhjs('+(i)+');SPrice('+(i)+');"onkeydown="myKeyDown2();"onclick="this.select();">'+'<inputtype="hidden"name="h_ysCount'+(i)+'">'+'<inputtype="hidden"name="h_wcCount'+(i)+'"value="0">';varobjCel8=objRow.insertCell(7);objCel8.innerHTML='<inputtype="text"style="width:100%"name="PyOrdSPrice'+(i)+'"class="ClientTableflateditbox"readonly="">';varobjCel9=objRow.insertCell(8);objCel9.innerHTML='<inputtype="text"style="width:100%"name="PyOrdZh'+(i)+'"class="ClientTableflateditbox"readonly="">';varobjCel10=objRow.insertCell(9);objCel10.innerHTML='<imgsrc="../images/ndelete.gif"width="16"height="16"onclick="DeleteRow('+(i)+')"style="cursor:hand"title="">';objCel10.align="center";varobjCel11=objRow.insertCell(10);objCel11.innerHTML='<inputtype="hidden"name="CommidityTypeID'+(i)+'"value="">';objCel1.style.background="white"objCel2.style.background="white"objCel3.style.background="white"objCel4.style.background="white"objCel5.style.background="white"objCel6.style.background="white"objCel7.style.background="white"objCel8.style.background="white"objCel9.style.background="white"objCel10.style.background="white"objCel11.style.background="white"}
解决方案四:
什么意思没明白。。。。。。。。。。
解决方案五:
如下面的两个Java程序:1.packagecom.vinsunlight;publicclassTest2{}