我试图在ajax成功之后转到页面而没有任何成功。这是我的代码
$.ajax({
type: "POST",
data: {kwargs : le_selected },
url: baseurl,
success: function(data){
var url = "http://localhost/ye/index.php/enterprise/q_qwargs/"+data;
$(location).attr('href',url);
}
});
上面的代码将我带到了http://localhost/ye/index.php/enterprise/q_qwargs
页面,并遗漏了data
中的值。
这是重定向前的firebug中的post
和get
我怎样才能将这些数据包括在内?
答案 0 :(得分:0)
使用此代码
location.href='http://localhost/ye/index.php/enterprise/q_qwargs'+data;
答案 1 :(得分:0)
改变这个,
var url = "http://localhost/ye/index.php/enterprise/q_qwargs/"+data;
$(location).attr('href',url);