为了账号安全,请及时绑定邮箱和手机立即绑定

jquery想说爱你也不是很容易的事儿

标签:
JQuery

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="zh-cn" lang="zh-cn" dir="ltr">
    <head>
    <script type="text/javascript" language="javascript" class="lazyload" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsQAAA7EAZUrDhsAAAANSURBVBhXYzh8+PB/AAffA0nNPuCLAAAAAElFTkSuQmCC" data-original="http://code.jquery.com/jquery-1.6.1.min.js"></script>
</head>
<body class="mediawiki ltr ns-0 ns-subject page-首页 skin-modern">

<td>
        <a href="javascript:;" title="更新" alt="更新" onclick="status();"/>更新</a>
    </td>
<div id="listbao"></div>
</body></html>
<script type="text/javascript" language="javascript">
<!--
function status()
    {  
        $.ajax(
            {
            type: "POST",
            url: 'http://www.xxx.com',
            data: { id: 'test'},
            error: function(XMLHttpRequest, textStatus, errorThrown){
                        alert(XMLHttpRequest.status);
                        alert(XMLHttpRequest.readyState);
                        alert(textStatus);
                        alert( errorThrown);
                        },
            complete: function(XMLHttpRequest, textStatus) {
                        this; // 调用本次AJAX请求时传递的options参数
                    },
            success: function(result){alert(result);}
            });
}
-->
</script>

---------------------------------------------------------------------------------------------------------------------------------------------------------------

上面代码怎么运行.自么都有错误.写的也都对啊..errorthrown 提示 not transport .搞什么搞..

找谷歌大叔吧....就找到下在这个BUG

Ajax calls to encoded Internationalized domain names doesn't work in Internet Explorer

Using jQuery 1.5 or 1.5.1, any ajax() calls to encoded Internationalized domain names (IDN) (like xn--bcher-kva.ch) seems to fail in Internet Explorer 8. It worked fine in jQuery 1.4.4 and also with 1.5+ in any other browser than IE. It also works when using the unencoded domain name.

What happens in IE8 is that the ajax error callback is triggered with the not so helpful "error" in the textstatus variable, and jqXHR.responseText as "undefined".

I know I'm supposed to provide a test case, but unfortunately I only have access to one IDN, which belongs to a customer, so I can't. I hope this report can come to some use anyway. Maybe someone else who sees the ticket have access to a public IDN and can provide a test case (any simple ajax call will do).

真让jq打败了..

换了1.4.4版本正常了

点击查看更多内容
TA 点赞

若觉得本文不错,就分享一下吧!

评论

作者其他优质文章

正在加载中
  • 推荐
  • 评论
  • 收藏
  • 共同学习,写下你的评论
感谢您的支持,我会继续努力的~
扫码打赏,你说多少就多少
赞赏金额会直接到老师账户
支付方式
打开微信扫一扫,即可进行扫码打赏哦
今天注册有机会得

100积分直接送

付费专栏免费学

大额优惠券免费领

立即参与 放弃机会
意见反馈 帮助中心 APP下载
官方微信

举报

0/150
提交
取消