“来自网页的消息” Internet Explorer 8(兼容模式)
加载我的最新网站项目时,我从 Internet Explorer 8 收到一些奇怪的消息:
尚不存在 ID 为 #body-news-content .post 的对象。创建时调用 curkeyCorners(setting, obj)。
该网站在 WordPress 上运行,在 Internet Explorer 中使用 curveyCorners 作为圆角。我可能应该提到该网站本身可以正确呈现,但由于某种原因 Internet Explorer 坚持向我提供此消息。
这是图像的 screengrab:(
元内容:我不能发布多个链接因此,如果您想查看正在运行的临时站点,我将回复一个 URL,感谢您提供的所有帮助。)
I'm getting some strange messages from Internet Explorer 8 when loading my latest web site project:
No object with ID #body-news-content .post exist yet. Call curbeyCorners(setting, obj) when it is created.
The site is running on WordPress, using curveyCorners for roundcorners in Internet Explorer. I should probably mention that the site itself renders correctly, but for some reason Internet Explorer insists on giving me this message.
Here is a screengrab of the image:
(Meta content: I can't post more than one link so if you would like to see the temp site in action I'll reply with a URL. Thanks you for any and all help.)
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
通过阅读错误消息,您使用的 curveyCorners 脚本似乎用于对 id 为“body-news-content”的元素中具有类“post”的元素进行“圆角”处理。然而,在 curveyCorners 脚本启动时,似乎没有这样的元素。
您应该稍后(例如,之前)调用该脚本,或者如果您使用的是 jQuery,则在 $(document).ready() 中调用该脚本。
By reading the error message, it seems that the curveyCorners script you are using is used to 'round' the corners of elements with class 'post' in the element of id 'body-news-content'. However it seems that at the time the curveyCorners script is launched, there is no such elements.
You should call the script later, before for example, or in $(document).ready() if you are using jQuery.
我终于自己找到了解决方案。在 curveyCorners 网站(说明页面)上,它们引用了对
Alert()
函数的调用,该函数用于在使用 curveyCorners 的对象或元素尚未加载时通知用户。我仍然不确定为什么这只发生在 Internet Explorer 中。无论如何,这就是解决方案!将此代码添加到您网站的标头标记中,
Alert()
警告就会消失。我希望这可以帮助其他有同样问题的人。
I finally managed to find a solution myself. On the curveyCorners website (the instructions page), they reference a call to the
Alert()
function which is used to inform users when objects or elements using curveyCorners have not loaded yet. Why exactly this only happens in Internet Explorer I'm still unsure about.Anyway, here is the solution! Add this bit of code to the header tag of your site and the
Alert()
warnings go away.I hope this helps others having the same problem.