Firebug 发出奇怪的警告
我正在处理大量的 AJAX 请求,AJAX 与 GET/POST。我有 Firebug 1.9.1。它向我显示警告说:
全局范围内 ID/NAME 引用的元素。使用 W3C 标准 document.getElementById() 代替
我不明白它的含义。我也搜索过。每个人都告诉如何抑制该警告,但我需要知道为什么会出现该警告?
I am playing with lots of AJAX requests, AJAX with GET/POST. I have got Firebug 1.9.1. It's showing me warning saying:
Element referenced by ID/NAME in the global scope. Use W3C standard document.getElementById() instead
I am not understanding what it means. I also searched. Everyone telling how to suppress that warning but I need to know why this warning is appearing?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
一点搜索发现您的问题有已经回答了。您正在引用全局范围内的元素。 Internet Explorer 会自动将带有 id 的元素放入全局范围内,但其他浏览器不会这样做。
如果您想引用一个元素,请这样做:
如果您需要进一步的帮助,您需要发布带有您的问题的代码。
A little searching revealed that your question has already been answered. You are referencing an element that is in the global scope. Internet Explorer will automatically put elements with an id in the global scope, but other browsers do not do this.
If you want to reference an element, do so like this:
If you want further help, you need to post code with your question.