ecshop前台页面使用ajax,回调函数里怎么接收?
1个回答
展开全部
导入jQuery包
jQuery(document).ready(function($){
var url = "";
var data = {"param":"我是参数","other":"me too"};
$.post(url,data,function(result){
//.............
});
});
private String param;
private String other;
public void Test(){
PrintWriter out = null;
try{
out = getResponse().getWriter();
if(param.equals("我是参数")){
out.print(other);
}
}catch(Exception e){
//...
}finally{
out.flush();
out.close();
}
}
//getter and setter...
jQuery(document).ready(function($){
var url = "";
var data = {"param":"我是参数","other":"me too"};
$.post(url,data,function(result){
alert(result);
});
});
jQuery(document).ready(function($){
var url = "";
var data = {"param":"我是参数","other":"me too"};
$.post(url,data,function(result){
//.............
});
});
private String param;
private String other;
public void Test(){
PrintWriter out = null;
try{
out = getResponse().getWriter();
if(param.equals("我是参数")){
out.print(other);
}
}catch(Exception e){
//...
}finally{
out.flush();
out.close();
}
}
//getter and setter...
jQuery(document).ready(function($){
var url = "";
var data = {"param":"我是参数","other":"me too"};
$.post(url,data,function(result){
alert(result);
});
});
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询