国产探花免费观看_亚洲丰满少妇自慰呻吟_97日韩有码在线_资源在线日韩欧美_一区二区精品毛片,辰东完美世界有声小说,欢乐颂第一季,yy玄幻小说排行榜完本

首頁 > 編程 > ASP > 正文

解析ASP申請單動態添加實現方法及代碼_ASP教程

2024-05-04 11:04:10
字體:
來源:轉載
供稿:網友

推薦:ASP如何實現多域名同一空間的處理
以這兩個域名為例:http://www.knowsky.com/http://code.knowsky.com/這兩個域名都是綁在同一個空間上,哈,但會跳到不同的目錄,不是在IIS設置上實現的,只是一小段ASP代碼,哈

一個申請單可以包含N個項目,添加申請單時就需要動態加入代碼了。

動態Table表格

 

以下為引用的內容:

<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.width="60"
ocell.innerhtml="<input type=hidden name=ggName" & lcountmx & " value=" & ggName & ">"& ggName

set ocell=orow.insertcell
ocell.classname="ListCellRow"
ocell.align="center"
ocell.width="60"
ocell.innerhtml="<input type=text size=10 name=thao" & lcountmx & " value=''>"

set ocell=orow.insertcell
ocell.classname="ListCellRow"
ocell.align="center"
ocell.width="60"
ocell.innerhtml="<input type=hidden name=dwei" & lcountmx & " value=" & dwei & ">"& dwei

set ocell=orow.insertcell
ocell.classname="ListCellRow"
ocell.align="center"
ocell.width="60"
ocell.innerhtml="<input type=text size=3 name=sliang" & lcountmx & " onchange='changeFun(" & lcountmx & ")' value=''>"
<%--
set ocell=orow.insertcell
ocell.classname="ListCellRow"
ocell.align="center"
ocell.width="60"
ocell.innerhtml="<input type=text size=3 name=djia" & lcountmx & " onchange='changeFun1(" & lcountmx & ")' value=''>"
--%>


set ocell=orow.insertcell
ocell.classname="ListCellRow"
ocell.innerhtml="<input type='button' value='刪除' onClick='vbscript:bdel(" & lcountmx & ")' id=button7 name=button7>"
ocell.align="center"

document.applicationsForm.ypsl.value = lcountmx
end function

function bdel(l)
tabzx.deleteRow document.getElementById("trzx" & l).rowindex
end function

function changeFun(obj1)
change obj1
end function

function changeFun1(obj1)
change1 obj1
end function
</script>



====================

分享:

發表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發表
主站蜘蛛池模板: 泗阳县| 淮滨县| 周口市| 崇义县| 苍山县| 于田县| 班玛县| 巨鹿县| 宿迁市| 长武县| 长顺县| 岳阳县| 玛曲县| 鲁甸县| 长沙市| 阳江市| 门头沟区| 潍坊市| 海丰县| 海安县| 东宁县| 永康市| 庆阳市| 安平县| 杨浦区| 航空| 三都| 台前县| 滦平县| 石家庄市| 安福县| 扎兰屯市| 南投县| 奈曼旗| 大城县| 余庆县| 温州市| 建阳市| 积石山| 宁南县| 阿克|