基本的“有光泽的”链接鼠标悬停脚本会产生非致命错误。 [英] Basic "shiny" link mouseover script produces non-fatal errors.

查看:66
本文介绍了基本的“有光泽的”链接鼠标悬停脚本会产生非致命错误。的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

嘿大家,因为我对这个论坛上的一些顶级助手很满意,我决定再按你​​的方式发送另一个。


即使我个人我已经开发了这个脚本的最小问题,我想知道是否有人可以用它修复我的小bug。


这个脚本运行得很好,除了偶尔,颜色变化将暂停因为(根据Mozilla Firefox 3的错误控制台)它会输出无效的颜色代码。它只会短暂爆发8个无效颜色代码(平均而言)然后回到正常范围内。


我觉得我错过了一些东西,也许是一双新的眼睛可以发现它。

现场演示

Hey everyone, as I have been by far pleased with some of the top helpers on this forum, I have decided to send another one your way.

Even though I am personally having minimal issues with this script I have developed, I am wondering if someone could fix my little bug with it.

This script runs perfectly fine, except once in a while, the color changing will "pause" because (according to Mozilla Firefox 3''s error console) it is putting out invalid color codes. It only does a short burst of 8 invalid color codes (on average) and then gets back in a normal range.

I feel I''m missing something, maybe a fresh pair of eyes can spot it out.

Live Demo Here

展开 | 选择 | Wrap | 行号

推荐答案

我刚刚意识到我有一个旧线程同样的剧本,但那是一个完全不同的初学者问题(我还是l赚取如何在页面中为一个对象分配一个动态的事件函数,我在这里完成了),这是更先进的,代码的完整版本,它有一个小问题,我认为与一些添加有关或者我想忘记应用于代码中某处的数字的乘法。昨晚我离开电脑的时候,我以为我脑子里都想到了这一点,(但又一次)回到它身边才意识到我不知道我在想什么。

这是原件:
http://bytes.com/forum/thread748828 .html
I just realized I had an old thread going for this same script, but that was with a completely different beginner issue (I was still learning how to assign an object in the page an event function on the fly, which I accomplished in this), this is much more advanced, and complete version of the code, which is having one little issue that I think is related to some addition or multiplication that I forgot to apply to the numbers somewhere in the code. I thought I figured it out in my head last night while I was away from the computer, (and yet again) came back to it only to realize I didn''t know what I was thinking about.

This is the original:
http://bytes.com/forum/thread748828.html


我不知道你是否修改了它,但我没有看到任何错误。
I don''t know if you''ve modified it since, but I don''t see any errors.


没有错误我想我应该说,但问题是它出现了错误的颜色代码。我觉得我的数学在某个地方......它有效,但只是鼠标悬停在页面上的链接,保持JavaScript错误控制台(在Mozilla或Opera似乎有好的),等待,最后你会看到一个爆发这个脚本产生的无效颜色代码。


我猜他们更多的是警告,然后是错误,但我正试图摆脱我的脚本所有错误。


这是我完成我提供给你的页面演示后我做的略微修改的代码。我只是修复了函数名称中的拼写错误,然后将其粘贴在.js文件中,以便我可以在论坛上轻松使用它。


任何愿意放置的人有点努力检查这个有我的感激之情。 :)


哦,并且在我之前的一些问题中感谢您的帮助。
There is no "error" I guess I should say, but the problem is that it comes up with an incorrect color code. I feel my math is off somewhere... It works, but just mouseover the link on the page, keep the JavaScript error console up (in Mozilla or Opera seem to have good ones), and just wait, eventually you will see a burst of invalid color codes produced by this script.

I guess they are more of warnings then errors, but I''m trying to rid my script of all bugs.

This is the slightly modified code I made after I finished the page demo I provided to you. I only really fixed the spelling errors in the names of the functions, and then stuck it in a .js file so I could easily use it on my forums.

Anyone willing to put a bit of effort into checking this out has my gratitude. :)

Oh, and acoder, thank you for your help in some of my previous questions.


这篇关于基本的“有光泽的”链接鼠标悬停脚本会产生非致命错误。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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