0

IE10 和 Chrome 有一些不同。

代码在这里:

<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<title></title>
<script src="http://code.jquery.com/jquery-1.10.1.min.js"></script>
<script type="text/javascript">
    function onClick() {
        $.ajax({
            type: "POST",
            url: "WebService.asmx/HelloWorld",
            dataType: "json",
            contentType: "application/json; charset=utf-8",
            success: function (json) { alert(json.d); },
            error: function (error) {
                alert("Error:" + error.responseText);
            }
        });
    }
</script>
</head>
<body>
<a href="http://www.google.com" onclick="onClick()" target="_blank"> CallBack</a>
</body>
</html>

当我在 Chrome 中浏览页面时,它会提示错误:,没有错误.responseTest,然后转到 google.com。当我在 IE10 中浏览页面时,它会提示 Hello World,但什么都没有。

4

0 回答 0