jq post

var source=[];
$.ajax({   
  type: "post",   
  url: "connectdb/select.jsp",    
  data: {database: "scmdb", selectsql: sql}, 
  async: false, method: 'post',  
  dataType: "text", 
  success: function(data) {   
    eval("source="+data+";");
    //source=eval(data); 
    alert("正确");
  },
  error: function(err) {  
    alert("错误");   
  }
});
return source;


posted @ 2018-07-04 20:33  baobaoMaster  阅读(151)  评论(0编辑  收藏  举报