我能够使用 jquery 插件修复我的 webservice ajax 问题。称为 jquery.jsonp.js。现在在我的成功功能上,我得到了一个 Uncaught
 SyntaxError: Unexpected token < 
chrome 控制台窗口上的错误。我尝试了各种方法来解决这个问题,但我不知所措
$.jsonp({
    type: "POST",
    url: "http://localhost:49524/mobile/Android/AndroidWebServices.asmx/CheckLogin",
    data: "email="+u+"&password="+p,
    crossDomain:true,
    success: function (data) {
        var s = $(data).find('string').text();;
        alert(s);
    }
});
如果有更好的方法从 xml 中获取价值,我将不胜感激任何帮助
<string xmlns="http://wmstec.com/">true</string>
是从 Web 服务返回的 XML 文件
 [WebMethod]
[ScriptMethod(ResponseFormat = ResponseFormat.Json)]
public string CheckLogin(string email, string password)
{
    string vid = "xxxx";
    //Get the User Information
    DB.User cur_user = DB.User.ByEmail(email.Trim());
    //if it failed, try by screen name
    if (-1 == cur_user.ID) { cur_user = DB.User.ByScreenName(email.ToLower()); }
    //Does their password match?
   if (cur_user.CheckPassword(password, vid))
    {
    // companys ToJSON function 
       return Utility.ToJSON("true");
    }
    else
    {
        return Utility.ToJSON(return "false");
    }
}
更新
$.ajax({
    type : "GET",
    url: "http://localhost:49524/mobile/Android/AndroidWebServices.asmx/CheckLogin",
    crossDomain:true,
    data: "email="+u+"&password="+p,//({ email: u, password: p}),
    dataType :"jsonp",
    contentType: "application/json; charset=utf-8",
    success : function(data){
        alert(data);}
});
返回相同的东西..所以它不一定是 jsonp 插件是一个问题.. 它显然是一个用户问题大声笑..