hmtl
<input type="text" placeholder="例如:1" id="one" name="one">
<input type="text" placeholder="例如:2" id="two" name="two">
<input type="text" placeholder="例如:1" id="one" name="one">
<input type="text" placeholder="例如:2" id="two" name="two">
<input type="button" value="提交" class="btn">
JS
$('.btn').click(function(){
var test=[];
var test01 = $('input[name="one"]');
var len01=test01.length; //图片的数量
for(var i =0; i<len01; i++){
test[i] = test01.eq(i).val();
}
S.ajax{
http://Url:PHP控制层
data: one: $('input[name="one"]').val(),
two: $('input[name="two"]').val(),
}
});
那些请问下 在controller层 和 model层里面应该怎样写,才能把数据保存表里面 (这里的例子是采用 一对多关联模式的),想一个表里面保存多个数组的信息???请高手回答
<input type="text" placeholder="例如:1" id="one" name="one">
<input type="text" placeholder="例如:2" id="two" name="two">
<input type="text" placeholder="例如:1" id="one" name="one">
<input type="text" placeholder="例如:2" id="two" name="two">
<input type="button" value="提交" class="btn">
JS
$('.btn').click(function(){
var test=[];
var test01 = $('input[name="one"]');
var len01=test01.length; //图片的数量
for(var i =0; i<len01; i++){
test[i] = test01.eq(i).val();
}
S.ajax{
http://Url:PHP控制层
data: one: $('input[name="one"]').val(),
two: $('input[name="two"]').val(),
}
});
那些请问下 在controller层 和 model层里面应该怎样写,才能把数据保存表里面 (这里的例子是采用 一对多关联模式的),想一个表里面保存多个数组的信息???请高手回答
