1.window.open(url);
打开新的一个页面进行请求。
2.windows.location.href
在当前页面进行请求
3.$.ajax({
url:"/test/user/query?uid="+userName+"&userPassword="+userPassword,
type:"post",
data:{},
dataType:"json",
timeout:10000,
context:null,
success:function(data){
alert(data.errcode+" "+data.content);
$("#checkError").html(data.errcode+" "+data.content);
}
})
在点前页面进行请求,并且接受和处理返回的数据。
纯属个人观点,如有错误还请指正