12

当我访问我的页面时,标题已正确加载,但一秒钟后,它变为“等待http://example.com ”。

页面加载,但即使在加载完所有内容后,标题仍会继续,但仅在 IE 选项卡中,因为在托盘中标题应为应有的样子。

PS:Chrome不会发生这种情况。并且 IE 版本是 10

问题的图片:
在此处输入图像描述

我的 HTML 代码:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
    <head>
        <meta http-equiv="content-type" content="text/html; charset=utf-8" />
        <link rel="shortcut icon" type="image/ico" href="http://www.datatables.net/favicon.ico" />

        <title>DataTables Editor example</title>
        <style class="include" type="text/css">
            @import "support/bootstrap/css/bootstrap.css";
            @import "support/bootstrap/dataTables/dataTables.bootstrap.css";
            @import "css/customTable.css";
        </style>

        <script class="include" type="text/javascript" charset="utf-8" src="../../../media/js/jquery.js"></script>
        <script class="include" type="text/javascript" charset="utf-8" src="../../../media/js/jquery.dataTables.js"></script>
        <script class="include" type="text/javascript" charset="utf-8" src="../../TableTools/media/js/TableTools.js"></script>
        <script class="include" type="text/javascript" charset="utf-8" src="../../TableTools/media/js/ZeroClipboard.js"></script>
        <script class="include" type="text/javascript" charset="utf-8" src="../media/js/dataTables.editor.js"></script>

        <script class="include" type="text/javascript" charset="utf-8" src="support/bootstrap/js/bootstrap.js"></script>
        <script class="include" type="text/javascript" charset="utf-8" src="support/bootstrap/dataTables/dataTables.bootstrap.js"></script>
        <script class="include" type="text/javascript" charset="utf-8" src="support/bootstrap/dataTables/dataTables.editor.bootstrap.js"></script>

        <script class="include" type="text/javascript" charset="utf-8" src="./js/custom.js"></script>

    </head>
    <body class="c_body">
        <div class="mContainer">
            <div id="dt_div">
                <table class="table table-striped table-bordered display" id="example">
                    <thead>
                        <tr>
                            <th style="text-align: center;">Data</th>
                            <th style="text-align: center;">Tema</th>
                            <th style="text-align: center;">V&iacute;nculo</th>
                            <th style="text-align: center;">Empresa</th>
                            <th style="text-align: center;">Sub contratada</th>
                            <th style="text-align: center;">NDP</th>
                            <th style="text-align: center;">CH</th>
                            <th style="text-align: center;">HHT</th>
                            <th style="text-align: center;">Ger&ecirc;ncia</th>
                            <th style="text-align: center;">&Aacute;rea Solicitante</th>
                            <th style="text-align: center;">CC</th>
                            <th style="text-align: center;">Rateio</th>
                        </tr>
                    </thead>
                </table>
            </div>
            <div class="spacer"></div>

        </body>
    </html>     
4

2 回答 2

9

微软已经承认这个问题是 IE10 中的一个错误。该问题已关闭,状态为“无法修复”。 https://connect.microsoft.com/IE/feedback/details/787208/ie10-waiting-for-domains-url-text-occasionally-gets-stuck-on-tabs-title-only-after-refreshing-it

这也是 IE11 中的一个已知错误。

于 2015-01-26T22:35:20.143 回答
7

奇怪的是,我似乎设法为 ie8 修复了它,而在 JavaScript 中使用它显然不会对 Firefox 或 Chrome 造成任何损害

 <script language="javascript">
  window.onfocus = function(){
  var title_var = document.title;
  document.title = title_var;
  }
 </script>

正如 Charly H 建议的那样,也可以使用 onload

 <script language="javascript">
  window.onload = function(){
  var title_var = document.title;
  document.title = title_var;
  }
 </script>
于 2016-01-23T02:54:30.093 回答