html - 阿拉伯语数据未在 ie8 中显示

标签 html ajax jquery internet-explorer-8

我遇到了阿拉伯语数据的问题。它在 IE 中显示不正确,而在 Chrome 中显示正确。

我正在使用两个文件“frameset.html”和“legend.html”。 “legend.html”包含阿拉伯语内容。之前我在“frameset.html”中使用 div 代替框架,阿拉伯语数据工作正常,但在我更改后出现问题。

框架集.html:

 <html>

 <head>
    <META http-equiv="Content-Type" content="text/html; charset=utf-8">
   <script src="js/jquery.js"></script>

     <script>
      $(document).ready(function(){

$("#topArb").load("Top_arb.jsp");
$("#actionBar").load("ActionBar.jsp");
$("#viewInbox").load("ViewInbox.jsp");
$("#legend").load("Legend.html");
$("#nav").load("Nav.jsp");

  });

   </script>

      </head>

      <body>
      <div id="main-container">

      <div id="topArb">
      </div>
       <div id="left-container">
   <div id="actionBar">
    </div>

     <div id="viewInbox">
  </div>
     <div id="legend">
     </div>
      </div>
      <div id="right-container">
     <div id="nav">
    </div>
   </div>
   </body>
  </HTML>

图例.html:-

     <HTML >
        <HEAD>
          <META http-equiv="Content-Type" content="text/html; charset=utf-8">


      </HEAD>

   <BODY topmargin=0>
<table align="center" style="" width="100%" height="20">
    <tr>
        <td>
            <table>
                <tr>
                    <td><IMG SRC="imgs/newH.gif" WIDTH="16"     HEIGHT="16"
                        BORDER="0" ALT=""></td>
                    <td class="SET">وثيقة عاجلة</td>
                </tr>
                <tr>
                    <td><IMG SRC="imgs/new.gif" WIDTH="16"  HEIGHT="16" BORDER="0"
                        ALT=""></td>
                    <td class="SET">وثيقة عادية</td>
                </tr>
            </table>
        </td>
        <td>
            <table>
                <tr>
                    <td><IMG SRC="imgs/BnewH.gif" WIDTH="16" HEIGHT="16"
                        BORDER="0" ALT=""></td>
                    <td class="SET">وثيقة مؤرشفة عاجلة</td>
                </tr>
                <tr>
                    <td><IMG SRC="imgs/Bnew.gif" WIDTH="16" HEIGHT="16"
                        BORDER="0" ALT=""></td>
                    <td class="SET">وثيقة مؤرشفة عادية</td>
                </tr>
            </table>
        </td>
        <td>
            <table>
                <tr>
                    <td><IMG SRC="imgs/CloseDoc.gif" WIDTH="18" HEIGHT="18"
                        BORDER="0" ALT=""></td>
                    <td class="SET">غير مقروء</td>
                </tr>
                <tr>
                    <td><IMG SRC="imgs/OpenDoc.gif" WIDTH="18" HEIGHT="18"
                        BORDER="0" ALT=""></td>
                    <td class="SET">مقروء</td>
                </tr>
            </table>
        </td>
        <td>
            <table>
                <tr>
                    <td><IMG SRC="imgs/L.gif" WIDTH="18" HEIGHT="18" BORDER="0"
                        ALT=""></td>
                    <td class="SET">رد</td>
                </tr>
                <tr>
                    <td><IMG SRC="imgs/ic_waitingreply.gif" WIDTH="18"
                        HEIGHT="18" BORDER="0" ALT=""></td>
                    <td class="SET">نسخة من الوثيقة</td>
                </tr>
            </table>
        </td>
        <td>

            <table>
                <tr>
                    <td><IMG SRC='images/ic_suspend.gif' WIDTH="18" HEIGHT="18"
                        BORDER="0" ALT=""></td>
                    <td class="SET">الأعمال المؤجلة</td>
                </tr>
                <tr>
                    <td><IMG SRC='imgs/ic_close.gif' WIDTH="18" HEIGHT="18"
                        BORDER="0" ALT=""></td>
                    <td class="SET">الأعمال المغلقة</td>
                </tr>
            </table>
        </td>

        <td><IMG SRC="imgs/Drafts.gif" WIDTH="18" HEIGHT="18" BORDER="0"
            ALT=""></td>
        <td class="SET">مسودة</td>
    </tr>
 </table>
    </BODY>

这里我的legend.html(marked)显示的是垃圾数据而不是阿拉伯数据 enter image description here

最佳答案

如果文档仅在通过 AJAX 加载时损坏,请尝试 ajaxSetup():

$.ajaxSetup({
  "beforeSend": function (xhr) {
    xhr.overrideMimeType("text/html; charset=UTF-8");
  }
});

$("#legend").load("Legend.html");

关于html - 阿拉伯语数据未在 ie8 中显示,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/17987499/

相关文章:

html - 跨度内的标签 p 不应用 css 样式

html - 将页脚元素放置到 div 的底部而不使用边距 - bootstrap

jquery - 如何使用 Jquery 在 Ajax 中添加两个具有独立功能的按钮

javascript - 如何克隆数组中的对象项?

jquery - 未捕获的异常 : Syntax error, 无法识别的表达式

html - 如何在打字时将占位符移至焦点顶部?

html - 悬停时更改另一个元素

php ajax 下拉列表

javascript - 如何避免 Jquery 在巨大的 ajax 页面上解析/清理?

javascript - 将 JavaScript 更改为 jQuery - createElement