Ajax在intel XDK JQuery Mobile开发中发布时出错 [英] Ajax gives an Error while posting in intel XDK JQuery Mobile development

查看:89
本文介绍了Ajax在intel XDK JQuery Mobile开发中发布时出错的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这是Ajax代码,由于某种原因,以下返回错误消息;我在线阅读了十字架脚本,但我无法理解它以及它如何影响JQuery移动应用程序中的Ajax

This is the Ajax codes the following return an error message for some reason; I read online on the cross sit scripting but i wasn't able to make sense of it and how it affects Ajax in JQuery mobile app

$.ajax({
                   url: "localhost:90/wizzy/php/main.php",
                   type: "POST",
                   dataType: "text",
                   crossDomain: true,
                   data: {tag:"1"},
                   dataType: "text",
                   contentType: 'application/json',
                   mimeType: 'application/json',
                   cache: false,
                   success: function(response, status){alert("hhh");},
                   error:  function(XMLHttpRequest, textStatus, errorThrown){
                        alert("textStatus:"+textStatus+",errorThrown:"+errorThrown+",XMLHttpRequest:"+XMLHttpRequest);}
               });





无法确定特定错误本身所显示的是错误函数中的警告框并且没有错误消息附带它



The particular error itself can not be determined all that is shown is the alert box in the error function and no error message comes with it

推荐答案

.ajax({
url:localhost:90 / wizzy / php / main.php,
type :POST,
dataType:text,
crossDomain:true,
data:{tag:1},
dataType:text,
contentType:'application / json',
mimeType:'application / json',
cache:false,
success:function(response,status){alert(hhh);} ,
错误:function(XMLHttpRequest,textStatus,errorThrown){
alert(textStatus:+ textStatus +,errorThrown:+ errorThrown +,XMLHttpRequest:+ XMLHttpRequest);}
} );
.ajax({ url: "localhost:90/wizzy/php/main.php", type: "POST", dataType: "text", crossDomain: true, data: {tag:"1"}, dataType: "text", contentType: 'application/json', mimeType: 'application/json', cache: false, success: function(response, status){alert("hhh");}, error: function(XMLHttpRequest, textStatus, errorThrown){ alert("textStatus:"+textStatus+",errorThrown:"+errorThrown+",XMLHttpRequest:"+XMLHttpRequest);} });





无法确定特定错误本身所显示的是错误函数中的警告框并且没有错误消息随附



The particular error itself can not be determined all that is shown is the alert box in the error function and no error message comes with it


这篇关于Ajax在intel XDK JQuery Mobile开发中发布时出错的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆