自动添加行




var form = document.forms[0];
var objTable = document.getElementById("specialFee");
var objTableBody=objTable.children(0);
var rowCount = objTable.rows.length;
var newRow = document.createElement("TR");
newRow.align = "center";
newRow.style.background = "#E6FFF2";

var objCell1 = document.createElement("TD");
objCell1.align="center";
var objInput1_1 = document.createElement("<input name='Vchbox' type='checkbox' value=''>");
objInput1_1.id="Vchbox"+innum;
objInput1_1.attachEvent("onclick",new Function("vcheck(" +innum+ ");"));
objCell1.appendChild(objInput1_1);
newRow.appendChild(objCell1);

var objCell2 = document.createElement("TD");
objCell2.align="center";
var objInput2_1 = document.createElement("<input name='VSailNo' style='text-align: center;' type='text' class='input80' maxlength='6' size='6'>");
objInput2_1.id="VSailNo"+innum;
objCell2.appendChild(objInput2_1);
newRow.appendChild(objCell2);


var objCell10 = document.createElement("TD");
var objInput10_1 = document.createElement("<select name='VFerry'>");
objInput10_1.id="VFerry"+innum;
objInput10_1.style.width="120";
<%
for(int i=0;i<ferryinfo_res.size();i++){
dynaBean = (DynaBean)ferryinfo_res.get(i);
%>
var objOption10_<%=i%> = document.createElement("option");
objOption10_<%=i%>.text="<%=CmnUtFunc.HtmlEncode(String.valueOf(dynaBean.get("FerryInfo_cname")).trim())%>(至<%=CmnUtFunc.HtmlEncode(String.valueOf(dynaBean.get("City2_name")))%>)";
objOption10_<%=i%>.value= "<%=CmnUtFunc.HtmlEncode(String.valueOf(dynaBean.get("FerryInfo_ferry")).trim())%>,<%=CmnUtFunc.HtmlEncode(String.valueOf(dynaBean.get("City1_name")).trim())%>,<%=CmnUtFunc.HtmlEncode(String.valueOf(dynaBean.get("City2_name")).trim())%>";
objInput10_1.add(objOption10_<%=i%>);
<%}%>
objInput10_1.attachEvent("onchange",new Function("f(" +innum+ ");"));
objCell10.appendChild(objInput10_1);
newRow.appendChild(objCell10);

var objCell3 = document.createElement("TD");
objCell3.align="center";
var objInput3_1 = document.createElement("<input name='VDeparture' readonly='readonly' style='text-align: center;' type='text' class='input80' maxlength='20' size='10'>");
objInput3_1.id="VDeparture"+innum;
objInput3_1.text="<%=CmnUtFunc.HtmlEncode(String.valueOf(dynaBean.get("City1_name")).trim())%>";
objCell3.appendChild(objInput3_1);
newRow.appendChild(objCell3);

objTableBody.appendChild(newRow);


评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值