如何向一个Table(运行在Server)中添加行
如何向一个Table(运行在Server)中添加行,我按一个按钮向Table中添加一个新行,但是每次都只是添加了一行,我不想用JavaScript如何实现
[解决办法]
给你一段vbscript写的动态添加行的脚本,如果你用javascript的话,只需要修改一下就行。
<SCRIPT language= "vbscript ">
dim lcount
lcount=0
sub doaddfj
lcount=lcount+1
dim oRow,oCell
set oRow=tabfjAdd.insertRow
orow.id= "tr " & lcount
'orow.name= "tr " & lcount
orow.classname= "InputFrameLine "
set ocell=orow.insertcell
ocell.classname= "ListCellRow "
ocell.innerhtml= " <input type=file id=fjwj " & lcount & " name=FJMC " & lcount & " style= 'width:100% ' class=tex1> "
set ocell=orow.insertcell
ocell.classname= "ListCellRow "
ocell.style.textalign= "center "
ocell.innerhtml= " <input type=button id=bscfj name=bscfj class=sbttn value= '删除附件 ' onclick= 'vbscript:doscfj( " & lcount & ") '> "
DocForm.count.value=Cint(DocForm.count.value)+1
end sub
sub doscfj(l)
tabfjAdd.deleteRow document.getElementById( "tr " & l).rowindex
DocForm.count.value=Cint(DocForm.count.value)-1
end sub
</SCRIPT>