JQuery .select() 意外调用方法或属性错误

发布于 2024-12-24 19:25:50 字数 532 浏览 3 评论 0原文

我使用 CLEditor 作为 RTE,它工作得很好,除了在 IE 8 中,产生的错误是:

SCRIPT65535: Unexpected call to method or property access.
jquery.cleditor.js, line 1027 character 7
SCRIPT65535: Unexpected call to method or property access. 
jquery.cleditor.js, line 1027 character 7 

它所引用的行是 editor.range[0].select();< /code> 在以下函数中:

function restoreRange(editor) {
    if (ie && editor.range)
        editor.range[0].select();
}

我已经查看了类似的问题,但没有一个具有这种上下文。任何帮助表示赞赏。

I'm using CLEditor as an RTE and it works perfectly except for in IE 8, the error that is produced is:

SCRIPT65535: Unexpected call to method or property access.
jquery.cleditor.js, line 1027 character 7
SCRIPT65535: Unexpected call to method or property access. 
jquery.cleditor.js, line 1027 character 7 

The line to which it is referring is the line editor.range[0].select(); in the following function:

function restoreRange(editor) {
    if (ie && editor.range)
        editor.range[0].select();
}

I've had a look around for similar questions but none of them have this kind of context. Any help appreciated.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

雅心素梦 2024-12-31 19:25:50

我太低了,无法发表评论,所以我会在答案块中建议这一点......
你能发布一些你的文档吗?每当我在 IE 中看到类似这样应该有效的奇怪错误时,我都会检查 html 文档是否指定了 doctype。

问题可能是 IE8 在怪异模式下运行吗?

I'm too low to comment, so I'll suggest this in the answer block...
Could you post some of your document? Whenever I see a strange error in IE like this for something that should work, I check to see whether the html document has a doctype specified.

Could the issue be IE8 running in quirks mode?

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文