紧急求助~js添加动态文本框错误位了,搞上一个上午没搞好
看下图~怎么也调不好,除非把第一个
删除它就正常了,这是什么问题呀?搞了一个上午,崩溃了
无标题文档.div_row{border:none; border-bottom:dotted 1px gray; }
.div_row2{border:none; border-bottom: solid 1px gray; }
.vendor{ width:80px; margin-bottom:2px; margin-top:2px;}
.ipn{ width:120px;margin-bottom:2px; margin-top:2px;}
.datecode{ width:120px;margin-bottom:2px; margin-top:2px;}
.qty{ width:60px;margin-bottom:2px; margin-top:2px;}
.workno{ border:#999 solid 1px; width:100px; background-color:#CCC; font-size:14px; font-weight:bold; height:24px; }
.modelid{ border:#999 solid 1px; width:150px; background-color:#CCC; font-size:14px; font-weight:bold; height:24px;}
.lotqty{ border:#999 solid 1px; width:60px; background-color:#CCC; font-size:14px; font-weight:bold; height:24px;}
.trsdate{ border:#999 solid 1px; width:150px; background-color:#CCC; font-size:14px; font-weight:bold; height:24px;}
//var num=1
function addvendor(a,b,c){
//alert (a+b+c)
//return false;
document.getElementById("showvendor"+a).style.display="block"
var AssCode = document.createElement("input"); //創建測試項目ID input
AssCode.type = "hidden";
AssCode.id = "AssCode"+num;
AssCode.name = "AssCode"+num;
AssCode.value=b
document.getElementById("show_AssCode_div"+a).appendChild(AssCode);
var AssName = document.createElement("input"); //創建測試項目ID input
AssName.type = "hidden";
AssName.id = "AssName"+num;
AssName.name = "AssName"+num;
AssName.value=b
document.getElementById("show_AssName_div"+a).appendChild(AssName);
var iPN2 = document.createElement("input"); //創建測試項目ID input
iPN2.type = "hidden";
iPN2.id = "iPN2"+num;
iPN2.name = "iPN2"+num;
iPN2.value=c
document.getElementById("show_iPN2_div"+a).appendChild(iPN2);
var vendor = document.createElement("select"); //創建測試項目ID input
vendor.className = "vendor";
vendor.id = "vendor"+num;
vendor.name = "vendor"+num;
vendor.options[0] = new Option( '請選擇 ', '');
document.getElementById("show_vendor_div"+a).appendChild(vendor);
var iPN = document.createElement("input"); //創建測試項目ID input
iPN.type = "text";
iPN.className = "ipn";
iPN.id = "iPN"+num;
iPN.name = "iPN"+num;
document.getElementById("show_iPN_div"+a).appendChild(iPN);
var DateCode = document.createElement("input"); //創建測試項目ID input
DateCode.type = "text";
DateCode.className = "datecode";
DateCode.id = "DateCode"+num;
DateCode.name = "DateCode"+num;
document.getElementById("show_DateCode_div"+a).appendChild(DateCode);
var qty = document.createElement("input"); //創建測試項目ID input
qty.type = "text";
qty.className = "qty";
qty.id = "qty"+num;
qty.name = "qty"+num;
document.getElementById("show_qty_div"+a).appendChild(qty);
num++;
document.getElementById("num").value=num-1;
//alert(a)
}
,document.getElementById('AssCode'+).value,document.getElementById('iPN2'+).value)" /> " type="hidden" id="AssCode" /> | " type="hidden" id="AssName" /> | " type="hidden" id="iPN2" /> | " class="vendor" id="select2"> 請選擇 | "> " type="text" class="ipn" id="iPN" /> | "> " type="text" class="datecode" id="DateCode" /> | "> " type="text" class="qty" id="qty" /> |
">
|
">
|
">
|
">
|
">
|
">
|
">
|
" />
num = document.getElementById("num").value
------解决思路----------------------
怎么搞定的,说来听听啊,过程。。。
------解决思路----------------------
这种用表格的 样式都很难调,跳过多少行 多少列一定要清楚,建议多用DIV