导入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包
1234567jQuery(document).ready(function($){ var url = ""; var data = {"param":"我是参数","other":"me too"}; $.post(url,data,function(result){ //............. });});