溫馨提示×

溫馨提示×

您好,登錄后才能下訂單哦!

密碼登錄×
登錄注冊×
其他方式登錄
點擊 登錄注冊 即表示同意《億速云用戶服務條款》

jquery想說愛你也不是很容易的事兒

發布時間:2020-06-02 09:38:59 來源:網絡 閱讀:365 作者:netmouse 欄目:web開發

<!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" src="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版本正常了

向AI問一下細節

免責聲明:本站發布的內容(圖片、視頻和文字)以原創、轉載和分享為主,文章觀點不代表本網站立場,如果涉及侵權請聯系站長郵箱:is@yisu.com進行舉報,并提供相關證據,一經查實,將立刻刪除涉嫌侵權內容。

AI

亚洲午夜精品一区二区_中文无码日韩欧免_久久香蕉精品视频_欧美主播一区二区三区美女