0
我必须给我一个PHP的链接,我可以用得到的输出:Ajax调用JSP页面
{富: “fooName”,fooLast: “fooLastName”}
我希望通过Ajax使用在JSP文件中此输出
我的剧本是这样的
function loadEmpName(empId){
var urlpath = "http://mysite.com:8080/searchByUid?"+empId;
$.ajax({
type: "GET",
url: urlpath,
dataType: "html",
contentType: "application/html; charset=utf-8",
success: function(result) {
//success here (most probably output to a <div> the result
},
error: function(error){
//errors here
}
});
}
即时消息没有得到任何错误,但我不是获得所需的输出。这甚至有可能开始?
我读不能够做一个跨域Ajax调用,我想知道是否这是
'“http://mysite.com:8080/searchByUid?”+ empId;'。这里有没有特意的文件扩展名? – christopher
我认为是这样,它返回一个字符串 – newbjava