0

当我右键单击使用以下代码打开 test.html 时,我遇到了一个奇怪的 IE 问题

    <!DOCTYPE html>
<!--
Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.html or http://ckeditor.com/license
-->
<html>
<head>
    <meta charset="utf-8">
    <title>API Usage &mdash; CKEditor Sample</title>
    <script src="../ckeditor.js"></script>



</head>
<body>



        <textarea cols="100" id="editor1" name="editor1" rows="10">&lt;p&gt;This is some &lt;strong&gt;sample text&lt;/strong&gt;. You are using &lt;a href="http://ckeditor.com/"&gt;CKEditor&lt;/a&gt;.&lt;/p&gt;</textarea>

        <script>
            // Replace the <textarea id="editor1"> with an CKEditor instance.
            CKEDITOR.replace( 'editor1');
        </script>




</body>
</html>

在 ckeditor 中选择文本时,我没有黑色边框。但是,当我将完全相同的代码放入 text.php 并通过 WAMP 访问时,我会在所选文本周围出现黑色边框。这个问题只存在于 IE 中,对于 chrome 和 firefox 有效。

Apache 或 PHP 标头会影响 IE 输出吗?

顺便说一句,我使用的是 ckeditor 版本 4,可以从http://ckeditor.com/download下载 。

4

1 回答 1

0

PHP 而不是纯 HTML 不应该影响 IE 输出,因为 PHP 一旦被解释,就会像纯 HTML 一样进入 IE。

使用“Open”命令打开会强制 IE 在本地上下文中加载“file://”协议,它可能会受到某些上下文保护的影响(在某些情况下,受信任的站点或文件上下文而不是 http 会影响 js,它不会起作用如预期的那样,或者它可能在某些功能中受到限制)。

只需尝试通过 WAMP 打开您的 .html 这应该可以作为 PHP 使用,即使在 IE 上也是如此

     try "http://localhost/test.html"

否则,您应该查看 IE 文档并尝试了解在“file:///”协议而不是“http://”上发生了什么样的保护/限制。

希望它可以帮助。

于 2013-05-09T14:26:21.117 回答