搜索 | 用户支持

防范以用户支持为名的诈骗。我们绝对不会要求您拨打电话或发送短信,及提供任何个人信息。请使用“举报滥用”选项报告涉及违规的行为。

详细了解

what changed with the mousemove event, doesn'y work w/FF7

  • 3 个回答
  • 1 人有此问题
  • 43 次查看
  • 最后回复者为 knorretje

more options

The code below was broken by the FF7 update. When you click on the image moving the mouse should scan across the enlarged image. Problem happens with Windows 7 as well.

The code below was broken by the FF7 update. When you click on the image moving the mouse should scan across the enlarged image. Problem happens with Windows 7 as well.

所有回复 (3)

more options

The Tools > Error Console show error about parsing the value of top an left, so something else is wrong.

A good place to ask advice about web development is at the mozillaZine Web Development/Standards Evangelism forum.
The helpers at that forum are more knowledgeable about web development issues.
You need to register at the mozillaZine forum site in order to post at that forum.

See http://forums.mozillazine.org/viewforum.php?f=25

more options

xPos=(ev.pageX-PhotoSm.x)/PhotoSm.width;
yPos=(ev.pageY-PhotoSm.y)/PhotoSm.height;
I noticed that:
PhotoSm.x and PhotoSm.y have a value of undefined, so xPos and yPos become NaN (not a number).
In the documentation it says: The HTMLImageElement x and y properties have been removed.
https://developer.mozilla.org/en/Firefox_7_for_developers
So maybe that is the reason that it's broken.

more options

I have tried this on my own computer. It do not know about older versions but it seems to work in Firefox 7 when you use the same code for xPos and yPos in Firefox as in IE. I get some kind of magnifier effect.

if (navigator.appName.indexOf("Microsoft") > -1)
{
ev=event;
}
xPos=(ev.clientX+document.body.scrollLeft-targetLeft)/PhotoSm.width;
yPos=(ev.clientY+document.body.scrollTop-targetTop)/PhotoSm.height;