document.getElementbyID('TICKER')没有属性 [英] document.getElementbyID('TICKER') has no properties

查看:70
本文介绍了document.getElementbyID('TICKER')没有属性的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述




我的网站( http://www.justiceinmexico.org/indextest.php )在Firefox中看起来不错,但在IE浏览器中很糟糕,我认为这是因为我下载的免费网络自动收报机的javascript错误互联网。


当我在其上运行Firebug时,它说:


document.getElementById(" TICKER")没有属性

TICKER_CONTENT = document.getElementById(" TICKER")。innerHTML;

这是完整的脚本:

Hi,

My website (http://www.justiceinmexico.org/indextest.php) looks good in Firefox, but horrible in IE, and I think it''s because of an error in the javascript of a free web ticker I got off the internet.

When I run Firebug on it, it says:

document.getElementById("TICKER") has no properties
TICKER_CONTENT = document.getElementById("TICKER").innerHTML;
Here is the complete script:

展开 | 选择 | Wrap | 行号

推荐答案

Heya,Rommel。欢迎来到TSDN!


发布源代码时请使用CODE标签。请在下次发布时查看页面右侧的REPLY GUIDELINES。


浏览器评估此JavaScript时是否存在TICKER元素?
Heya, Rommel. Welcome to TSDN!

Please use CODE tags when posting source code. See the REPLY GUIDELINES on the right side of the page next time you post.

Does the TICKER element exist at the time that the browser evaluates this JavaScript?



Heya,Rommel。欢迎来到TSDN!


发布源代码时请使用CODE标签。请在下次发布时查看页面右侧的REPLY GUIDELINES。


浏览器评估此JavaScript时是否存在TICKER元素?
Heya, Rommel. Welcome to TSDN!

Please use CODE tags when posting source code. See the REPLY GUIDELINES on the right side of the page next time you post.

Does the TICKER element exist at the time that the browser evaluates this JavaScript?



对不起。对于不使用代码标签,我深表歉意。我阅读了论坛指南,但我没有阅读回复指南。我现在可以看到他们了。


我不知道。我是个noobie。我只是复制粘贴免费的javascript自动收录机到我的网站,它搞砸了IE浏览器,但不是在Firefox上。


如何在浏览器评估时检查TICKER元素是否存在?


我认为答案是否定的,因为Firebug没有立即检测到错误,需要大约2分钟才能得出错误。很抱歉听起来完全无能为力,但我是。


顺便说一句,我先用了搜索栏,似乎很多人都有这个问题。但是,因为我不知道js我无法修复它。

Sorry about that. I apologize for not using the code tags. I read the forum guidelines, but I didn''t read the Reply guidelines. I can see them now.

I don''t know. I''m a noobie at this. I just copy pasted the free javascript ticker to my website and it messed it up on IE, but not on Firefox.

How can I check if the TICKER element exists at the time that the browser evaluates it?

I think the answer is no, because Firebug doesn''t detect an error immediately, it takes about 2 minutes to come up with the error. Sorry for sounding completely clueless, but I am.

By the way, I used the search bar first and it seems that many people hve this problem. However, since I don''t know js I can''t fix it.


嗨...


必须有一个具有id =" TICKER"的html元素在您的页面...确保,您可能应该参考您复制脚本的页面。


何时调用脚本...在加载时间内页面或正文onload事件?你应该总是使用身体的onload-event,因为你的页面的dom现在可以使用了。


亲切的问候
hi ...

there has to be a html-element with the id="TICKER" at your page ... assure that, may be you should refer to the page from where you copied the script.

when do you call the script ... during the load-time of the page or in the body onload event? you should always use the onload-event of the body since the dom of your page is ready to use at this time.

kind regards


这篇关于document.getElementbyID('TICKER')没有属性的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆