您好,欢迎来到三六零分类信息网!老站,搜索引擎当天收录,欢迎发信息

ajax的问题

2024/6/23 6:30:23发布31次查看
var arr1 = a.split(|);   
for(var i=0;i if(kkk1[i].checked==true){
xmlhttp.open(post,../php/s18.php,true)
xmlhttp.setrequestheader(content-type,application/x-www-form-urlencoded);
xmlhttp.onreadystatechange=chuli_18;
xmlhttp.send(aa=+aa);
}
}
checkbox为true的话 就把id传过来 然后删除checkbox对应的数据  如果是几个id 的话我怎么样发送才可以在php接到这些id  我现在3个只能拿到1个
回复讨论(解决方案) 3个id可以直接php/s18.php?id1=1&id2=2&id3=3这样直接传值过去了
也可以json数组传过去
var arr1 = a.split(|);
var s = '';
for(var i=0;i   if(kkk1[i].checked==true){
    s += '&aa[]='+aa;
  }
}
xmlhttp.open(post,../php/s18.php,true)
xmlhttp.setrequestheader(content-type,application/x-www-form-urlencoded);
xmlhttp.onreadystatechange=chuli_18;
xmlhttp.send(s.substr(1));
keyword:qwrap
该用户其它信息

VIP推荐

免费发布信息,免费发布B2B信息网站平台 - 三六零分类信息网 沪ICP备09012988号-2
企业名录 Product