<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>下一步,工件信息錄入</title>
<%
dim lianluo
lianluo=session("lianluo")
%>
<center>
<h3><strong><font color="#FF0000"> <%=lianluo%> </font></strong></h3>
</center>
<form name="form1" method="post" action="gj_save.asp">
<script language=javascript type=text/javascript>
<!--
var RES_BT_DELETE = "刪除";
var isIE = (navigator.userAgent.indexOf("MSIE") != -1);
var fileIndex = 1;
function addFile() {
var spanId = "filespan";
var fileId = "upload" + (fileIndex++);
addInputFile(spanId, fileId);
}
function addInputFile(spanId, fileId) {
var span = document.getElementById(spanId);
if (span != null) {
var divObj = document.createElement("div"), lianluoObj, indexObj, tuhaoObj, taoObj, cailiaoObj, houObj, kuanObj, gaoObj, duObj, reObj, beizhuObj, delObj;
divObj.id = fileId;
if (isIE) {
lianluoObj = document.createElement("<input type=hidden>");
indexObj = document.createElement("<input type=text>");
tuhaoObj = document.createElement("<input type=text>");
taoObj = document.createElement("<input type=text>");
cailiaoObj = document.createElement("<input type=text>");
houObj = document.createElement("<input type=text>");
kuanObj = document.createElement("<input type=text>");
gaoObj = document.createElement("<input type=text>");
duObj = document.createElement("<input type=text>");
reObj = document.createElement("<input type=text>");
beizhuObj = document.createElement("<input type=text>");
delObj = document.createElement("<input type=button onclick=delInputFile('" + spanId + "','" + fileId + "')>");
} else {
lianluoObj = document.createElement("input");
lianluoObj.type = "hidden";
indexObj = document.createElement("input");
indexObj.type = "text";
tuhaoObj = document.createElement("input");
tuhaoObj.type = "text";
taoObj = document.createElement("input");
taoObj.type = "text";
cailiaoObj = document.createElement("input");
cailiaoObj.type = "text";
houObj = document.createElement("input");
houObj.type = "text";
kuanObj = document.createElement("input");
kuanObj.type = "text";
gaoObj = document.createElement("input");
gaoObj.type = "text";
duObj = document.createElement("input");
duObj.type = "text";
reObj = document.createElement("input");
reObj.type = "text";
beizhuObj = document.createElement("input");
beizhuObj.type = "text";
delObj = document.createElement("input");
delObj.type = "button";
delObj.setAttribute("onclick", "delInputFile('" + spanId + "','" + fileId + "')", 0);
}
lianluoObj.id = "lianluo";lianluoObj.value = 0;lianluoObj.name = "lianluo";
indexObj.name = "index";indexObj.id = "index";indexObj.size = "6";indexObj.value = fileIndex;
tuhaoObj.name = "tuhao";tuhaoObj.id = "tuhao";tuhaoObj.size = "18";
taoObj.name = "tao";taoObj.id = "tao";taoObj.size = "8";
cailiaoObj.name = "cailiao";cailiaoObj.id = "cailiao";cailiaoObj.size = "8";
houObj.name = "hou";houObj.id = "hou";houObj.size = "8";
kuanObj.name = "kuan";kuanObj.id = "kuan";kuanObj.size = "8";
gaoObj.name = "gao";gaoObj.id = "gao";gaoObj.size = "8";
duObj.name = "du";duObj.id = "du";duObj.size = "8";
reObj.name = "re";reObj.id = "re";reObj.size = "8";
beizhuObj.name = "beizhu";beizhuObj.id = "beizhu";beizhuObj.size = "20";
delObj.value = RES_BT_DELETE;
divObj.appendChild(lianluoObj);
divObj.appendChild(indexObj);
divObj.appendChild(tuhaoObj);
divObj.appendChild(taoObj);
divObj.appendChild(cailiaoObj);
divObj.appendChild(houObj);
divObj.appendChild(kuanObj);
divObj.appendChild(gaoObj);
divObj.appendChild(duObj);
divObj.appendChild(reObj);
divObj.appendChild(beizhuObj);
divObj.appendChild(delObj);
span.appendChild(divObj);
}
}
function delInputFile(spanId, fileId) {
var span = document.getElementById(spanId);
var divObj = document.getElementById(fileId);
if (span != null && divObj != null) {
span.removeChild(divObj);
}
}
//-->
</script>
<meta content="MSHTML 6.00.2800.1528" name=GENERATOR>
</head>
<body onkeydown="quickadd(event)">
<form name=form1 id=form1 action="" method=post onSubmit="return checkCnt();">
<table height=20 cellSpacing=1 cellPadding=8 width="90%" align=center>
<tbody>
<tr>
<TD id=filespan noWrap>
<div id=0>
<input name="11" type="text" id="11" size="6" value="序號" disabled><input name="22" type="text" id="22" size="18" value="圖號" disabled><input name="33" type="text" id="33" size="8" value="套" disabled><input name="44" type="text" id="44" size="8" value="材料" disabled><input name="55" type="text" id="55" size="8" value="厚" disabled><input name="66" type="text" id="66" size="8" value="寬" disabled><input name="77" type="text" id="77" size="8" value="長" disabled><input name="88" type="text" id="88" size="8" value="鍍" disabled><input name="99" type="text" id="99" size="8" value="熱" disabled><input name="00" type="text" id="00" size="20" value="備注" disabled>
</div>
<div id=1>
<input name="index" type="text" id="index" value="1" size="6"><input name="tuhao" type="text" id="tuhao" size="18"><input name="tao" type="text" id="tao" size="8"><input name="cailiao" type="text" id="cailiao" size="8"><input name="hou" type="text" id="hou" size="8"><input name="kuan" type="text" id="kuan" size="8"><input name="gao" type="text" id="gao" size="8"><input name="du" type="text" id="du" size="8"><input name="re" type="text" id="re" size="8"><input name="beizhu" type="text" id="beizhu" size="20"><INPUT id=btnAdd onclick=addFile() type=button value=添加>
</div>
</TD>
</tr>
<tr>
<td noWrap align=center>
<input name="submit" type="submit" value="提交">
<input name="reset" type="button" value="取消">
</td>
</tr>
</tbody>
</table>
</form>
</body>
</html>
<script language="JavaScript">
cnt = 0;
function checkCnt(){
document.form1.Submit.disabled=true;
cnt++;
if (cnt!=1){
alert('正在提交數據. Please Wait');
return false;
}
}
function quickadd(event)
{
if(event.altKey && event.keyCode == 9)
{
if (cnt==0){
this.addFile();
}else{
alert('正在提交數據. Please Wait');
}
}
}
</script>
按ait+s鍵,可以增加行。
可是這樣的數據我要如何提交到數據庫呢?
數據是SQL,數據類型如圖
[此贴子已经被作者于2006-2-18 14:23:00编辑过]