<!--#include file="../../include/conn.asp"-->
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title></title>
<script language="javascript">
function setid()
{
str='';
if(!window.form1.upcount.value)
window.form1.upcount.value=1;
for(i=1;i<=window.form1.upcount.value;i++)
str+='Color'+i+': <input type="text" name="color'+i+'"> 件数'+i+' <input type="text" name="num'+i+'"> length'+i+' <input type="text" name="length'+i+'"> size<input type="radio" name="size'+i+'" value="size_s">S <input name="size'+i+'" type="radio" value="size_m" checked>M<input type="radio" name="size'+i+'" value="size_l">L<input type="radio" name="size'+i+'" value="size_xl">XL<br>';
window.upid.innerHTML=str+'<br>';
}
</script>
</head>
<body>
<form name="form1" method="post" action="add_ok.asp">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td>offerNo:<input type="text" name="textfield"></td>
</tr>
<tr>
<td>Brand:<input type="text" name="textfield2"></td>
</tr>
<tr>
<td>Style:<input type="text" name="textfield3"></td>
</tr>
<tr>
<td>颜色的种类个数:<input type="text" name="upcount" class="tx" value="1">
<input type="button" name="Button" class="bt" οnclick="setid();" value="设定"></td>
</tr>
<tr>
<td id="upid"></td>
</tr>
<tr>
<td >
<input type="submit" name="Submit" value="提交"></td>
</tr>
</table>
</form>
</body>
</html>
<!--#include file="../../include/conn.asp"-->
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title></title>
</head>
<body>
<%
upcount=Request.Form("upcount")
for i=1 to upcount
color=request.Form("color"&i)
num=request.Form("num"&i)
length=request.Form("length"&i)
size_s=request.Form("size"&i)
conn.execute("insert into W_store_color_size (color,"&size_s&",length) Values ('"&color&"',"&num&",'"&length&"')")
next
%>
</body>
</html>