js新闻源上的错误消息 [英] Error message on a js newsfeed

查看:60
本文介绍了js新闻源上的错误消息的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述




我正在尝试在我的网页中使用免费的RSS新闻源,它就像魅力一样,但在第一次加载时会抛出错误信息:


myElement.getElementsByTagName(命名)[0] .firstChild为空


在firefox错误控制台中,消息为:

错误:document.getElementById(" TICKER")为空

源文件:http://www.xxxxxx.com/js/webticker_lib.js行:5

但是在webticker_lib.js的第5行是声明:


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


它还会在页面中出现另一个错误:


错误:st未定义

源文件: http://www.xxxxxx.com/js/ticker.js行:103

但是在js中又是:


行:103


103 if(itemLen> st.length){

storyCount ++;

if(storyCount> ; = rssItems.length){

storyCount = 0;



有人可以帮忙吗


谢谢

Daniel

Hi

I''m trying to use a free RSS news feed in my webpage and it works like a charm but throws up an error message on the first load:

myElement.getElementsByTagName(naming)[0].firstChild is null

In firefox error console the message is :

Error: document.getElementById("TICKER") is null
Source File: http://www.xxxxxx.com/js/webticker_lib.js Line: 5

But in line 5 of the webticker_lib.js is the statement :

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

It also come up with another error within the page:

Error: st is undefined
Source File: http://www.xxxxxx.com/js/ticker.js Line: 103

But again in the js it is :

Line: 103

103 if ( itemLen > st.length ) {
storyCount++;
if ( storyCount >= rssItems.length ) {
storyCount = 0;


Can someone help please

Thanks
Daniel

推荐答案

你真的有一个id属性为TICKER的元素吗?在你的饲料中?


你还没有定义st?你说的是什么?
Do you actually have an element with an id attribute of "TICKER"? in your feed?

You haven''t defined st? What is this st you speak of?


你好

是的,在HTML中使用了ID TICKER


和我真的不知道st是什么,但那就是错误控制台中出现的错误消息我只能假设它指的是新闻故事的字符串长度!
Hi
Yes the id TICKER is used in the html

And I really don''t know what the st is but thats the error message that comes up in the error console I can only presume it refers to the string length of the news story !


Any运气好吗?

任何人?
Any luck yet?
Anyone ?


这篇关于js新闻源上的错误消息的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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