ecshop前台页面使用ajax,回调函数里怎么接收?
答案:2 悬赏:70 手机版
解决时间 2021-02-18 14:05
- 提问者网友:未信
- 2021-02-17 19:51
ecshop前台页面使用ajax,回调函数里怎么接收?
最佳答案
- 五星知识达人网友:duile
- 2021-02-17 20:44
导入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);
});
});
全部回答
- 1楼网友:等灯
- 2021-02-17 21:59
make_json_result($smarty->fetch('jieshou.htm'),'',$opt);
我要举报
如以上回答内容为低俗、色情、不良、暴力、侵权、涉及违法等信息,可以点下面链接进行举报!
点此我要举报以上问答信息
大家都在看
推荐资讯