以下为引用的内容:
<table border="0" width="98%" id="tabzx" name="tabzx" align="center" class="table_list"> <tr> <td class="th_list" width="10%"> A列 </td> <td class="th_list" width="10%" align="center"> B列 </td> <td class="th_list" width="10%" align="center"> C列 </td> <td class="th_list" width="5%" align="center"> D列 </td> <td class="th_list" width="5%" align="center"> E列 </td> <td class="th_list" width="5%" align="center"> F列 </td><%-- <td class="th_list" width="7%" align="center"> G列 </td>
--%><td class="th_list" width="13%"> [ <a href="javascript:doSelect(450,400,'formEdit.supplyId')"><font color="FF0000">选择设备</font> </a>] </td> </tr> </table>
JS代码如下(根据条件弹出设备列表,然后选择已有设备)
function doSelect(Width,Height,ctrlobj){
var k; var s = new Object(); k=showModalDialog("/Applications_add_addsearch.jsp",s,"dialogWidth:320px;status:no;scroll:no;dialogHeight:280px"); if (k!=null) { var url = "/applicationsAction.do?method=insertAddSeach&stId="+k[0]+"&sbId="+k[1]+"&ggId="+k[2]; window.open(url,'newwindow', 'height=600, width=800, toolbar=no, menubar=no, scrollbars=yes, resizable=no,location=no, status=no'); }
}
=========================
根据选择动态添加数据代码
<script language="vbscript"> dim lcountmx lcountmx = 0 function badd(stid,stName,vcid,vcName,ggid,ggName,dwei,sliang,djia) lcountmx=lcountmx+1 dim oRow,oCell,ii set oRow=tabzx.insertRow orow.id="trzx" & lcountmx set ocell=orow.insertcell dim sss sss="<input type=hidden name=cgdjmx"& lcountmx & " value="""">" sss=sss&"<input type=hidden name=stid"& lcountmx & " value=" & stid & ">" sss=sss&"<input type=hidden name=stName"& lcountmx & " value=" & stName & ">" sss=sss&"<input type=hidden name=vcid"& lcountmx & " value=" & vcid & ">" sss=sss&"<input type=hidden name=ggid"& lcountmx & " value=" & ggid & ">" sss=sss&stName ocell.innerhtml= sss ocell.classname="ListCellRow"
set ocell=orow.insertcell ocell.classname="ListCellRow" ocell.align="center" ocell.width="60" ocell.innerhtml="<input type=hidden name=vcName" & lcountmx & " value=" & vcName & ">"& vcName
set ocell=orow.insertcell ocell.classname="ListCellRow" ocell.align="center" ocell.wi
|