$.post( '2list_confirm.php', {data_send:cart_send}, function(data){ document.write(data); //window.location.href ="2list_confirm.php"; });
window.location.href ="2list_confirm.php?data_send="+cart_send;此种方式是属于get请求, 然后使用$data_get=$_GET['data_send']去取吧,注意到底是get请求还是post请求, 如果使用表单提交根据表单中的method判断是get还是post,$.post这个是post请求,$.ajax这个也需要在里面设置post还是get请求,我对PHP不是很了解,我想$_POST应该是取post的参数吧,那么肯定就存在$_GET这个变量,而这个变量就是去get请求的参数吧
这个不需要用异步啊 直接链接跳转就行了啊window.location.href ="2list_confirm.php?data_send="+cart_send; 干嘛多此一举呢
87,910
社区成员
224,616
社区内容
加载中
试试用AI创作助手写篇文章吧