求助这段 ASP 页面中的动态表格,如何加代码才能保存到 ACCESS 数据库中?
<html><head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title></title>
<script type="text/javascript" src="http://ajax.
<style type="text/css">
/*reset.css Start*/
body,div,dl,dt,dd,ul,ol,li,h1,h2,h3,h4,h5,h6,pre,
form,fieldset,input,textarea,span,p,blockquote,th,td {
padding: 0;
margin: 0;
}
table {
border-collapse: collapse;
border-spacing: 0;
}
fieldset,img {
border: 0;
}
address,caption,cite,code,dfn,em,strong,th,var {
font-weight: normal;
font-style: normal;
}
ol,ul {
list-style: none;
}
caption,th {
text-align: left;
}
h1,h2,h3,h4,h5,h6 {
font-weight: normal;
font-size: 100%;
}
q:before,q:after {
content:'';
}
abbr,acronym { border: 0;
}
/*reset.css End*/
table{margin: 10px auto 0;}
td,th{padding: 5px 10px; text-align: center;}
.add,.remove{color: blue; text-decoration: underline; cursor: pointer; margin: 0 5px;}
.i_color_error,.i_model_error{display: none; color: red;}
.pirce2,.shulian,.ku,.tiaoma{width: 70px;}
.pic{color: #333333; width: 150px;}
#i_model_add{background: #FF8000; color: #EEEEEE; padding: 3px 5px; box-shadow: 0px 1px 1px 1px #CCCCCC; border-radius: 3px; cursor: pointer; margin-left: 5px;}
</style>
</head>
<body>
<div style="width: 750px; margin: 50px auto 0;">
<div>颜色分类:<input id="i_color" width="30" /><span class="i_color_error">*</span></div>
<div>规格型号:<input id="i_model" width="40" /><span class="i_model_error">*</span><span id="i_model_add">增加</span></div>
<table width="750" border="1" cellpadding="4" cellspacing="1" bordercolor="#C9DBEF" id="ctr" >
<tr>
<td>颜色</td>
<td>图片</td>
<td>规格</td>
<td>价格</td>
<td>数量</td>
<td>仓库</td>
<td>条码</td>
<td>删除</td>
</tr>
</table>
<script type="text/javascript">
(function($){
var color = '';
var model = '';
var bool;
var td_size = $('#ctr tr:first td').size();
var tr;
var index = 0;
var boo_index;
var rowspan;
var click_bool;
$('#i_model_add').click(function(){
bool = false;
boo_index = true;
model = $('#i_model').val().trim();
color = $('#i_color').val().trim();
if(model == ''){
bool = true;
$('.i_model_error').show();
}
else{
$('.i_model_error').hide();
}
if(color == ''){
bool = true;
$('.i_color_error').show();
}
else{
$('.i_color_error').hide();
}
if(bool){
return false;
}
$('.sekuan').each(function(){
if($(this).html() == color){
rowspan = $(this).parent().attr('rowspan');
if(rowspan > 0){
rowspan ++;
}
else{
rowspan = 2;
}
$(this).parent().attr('rowspan',rowspan);
$(this).parent().parent().find('.pic').parent().attr('rowspan',rowspan);
tr = '<tr><td><span class="guige">' + model + '</span></td><td><input class="pirce2" value="<%=rs_buy("price2")%>"></td><td><input class="shulian" /></td><td><select class="ku"><option value="<%=rs_ku("id")%>"><%=rs_ku("ku")%></option></select> </td><td><input class="tiaoma" value="<%=rs_buy("tiaoma")%>"></td><td><span class="remove">删除</span></td></tr>';
$(this).parent().parent().after(tr);
boo_index = false;
}
});
if(boo_index){
tr = '<tr><td><span class="sekuan">' + color + '</span></td><td><input type="file" class="pic" /></td><td><span class="guige">' + model + '</span></td><td><input class="pirce2" value="rs_buy("price2")"></td><td><input class="shulian" /></td><td><select class="ku"><option value="<%=rs_ku("id")%>"><%=rs_ku("ku")%></option></select></td><td><input class="tiaoma" value="<%=rs_buy("tiaoma")%>"></td><td><span class="remove">删除</span></td></tr>';
$('#ctr tbody').append(tr);
}
});
$('.remove').live('click',function(){
if($(this).parent().parent().find('td').size() == td_size && (!$(this).parent().parent().find('td:first').attr('rowspan') || $(this).parent().parent().find('td:first').attr('rowspan') == 1)){
$(this).parent().parent().remove();
}
if($(this).parent().parent().find('td').size() < td_size){
click_bool = true;
$(this).parent().parent().prevAll('tr').each(function(){
if(click_bool && $(this).find('td:first').attr('rowspan')){
rowspan = $(this).find('td:first').attr('rowspan');
rowspan --;
$(this).find('td:first,td:eq(1)').attr('rowspan',rowspan);
click_bool = false;
}
});
$(this).parent().parent().remove();
}
if($(this).parent().parent().find('td').size() == td_size && $(this).parent().parent().find('td:first').attr('rowspan') > 1){
rowspan = $(this).parent().parent().find('td:first').attr('rowspan');
rowspan --;
$(this).parent().parent().next().prepend($(this).parent().parent().find('td:first,td:eq(1)').clone()).find('td:first,td:eq(1)').attr('rowspan',rowspan);
$(this).parent().parent().remove();
}
});
})(jQuery);
</script>
</div>
</body>
</html>