的onmouseover [英] onmouseover

查看:73
本文介绍了的onmouseover的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想用鼠标更换照片来更换照片



它必须非常简单但我找不到代码为了获得最佳解决方案

现在。

谁可以帮助我?

解决方案

" ; Sven Hanefeld <公顷****** @ nord-com.net>在留言中写道

news:bo ********** @ news1.ewetel.de ...

我想通过转过来改变图片他们用鼠标在
更轻的。
它一定很容易,但我现在找不到最佳解决方案的代码。
谁可以帮助我?



只需搜索谷歌群组中的''图像翻转''。


Sven Hanefeld写道:

我想用更轻便的鼠标来更换图片。
它必须非常简单,但我找不到最佳解决方案的代码<现在。
谁可以帮助我?



http://pointedears.de.vu/scripts/test/hoverMe 是一个解决方案但不是最好的

一个(我正在努力) v2.1 :-))

PointedEars


PS

你的line-b reak是b0rken(我在这里跳过了重新打包。)设置在下面

每行80个字符,建议72-76。如果你使用autogic

换行符,请在段落中避免使用手册。


Thomas''PointedEars''Lahn写道:

我想通过鼠标用较轻的
来更改图片。

http://pointedears.de.vu/scripts/test/hoverMe 是一个解决方案但不是最好的一个(我正在研究v2.1: - ))




你在2.0中采取的路线是一个很好的,虽然我有一些

建议,如果你喜欢:

- 我建议在脚本中添加一些相关的目标检查,

- 我也会为图像使用一些容器(为了保持

名称空间尽可能干净)。


它让我想起Gosha Bine的剧本,名为eazyroll.js,其中
自动翻转,但使用一个完全不同的概念

你可能会觉得有趣[1]。


想法是添加mousemove事件的处理程序并研究

目标;如果它是一个图像,那么检查是否存在

替代图像,然后根据名称约定来源更改

(替代图像必须具有 ; _a"作为后缀。


直接的好处是程序员的简单性:他/她只是

必须插入一个SCRIPT包含和那个是全部(没有链接,没有

mouseover / mouseout编码,没有别的)。当然这对主流浏览器(NN4 +,IE4 +)有效。

干杯,

是的。

[1]我当然非常感兴趣!我当时是js的初学者(不是我现在是专家),他的剧本让我

取得了巨大的进步,更一般地来说,喂我的编程兴趣

(我没有技术背景)。这对我来说都是怀旧的,当我在瑞典冬天乘坐夜班车时,我正在阅读打印

脚本:-)


I would like to change pictures by going over them with the mouse in lighter
ones.
It must be very easy but I can''t find the code for the best solution right
now.
Who can help me?

解决方案

"Sven Hanefeld" <ha******@nord-com.net> wrote in message
news:bo**********@news1.ewetel.de...

I would like to change pictures by going over them with the mouse in lighter ones.
It must be very easy but I can''t find the code for the best solution right
now.
Who can help me?


Just search google groups for ''image rollovers''.


Sven Hanefeld wrote:

I would like to change pictures by going over them with the mouse in lighter
ones.
It must be very easy but I can''t find the code for the best solution right
now.
Who can help me?



http://pointedears.de.vu/scripts/test/hoverMe is a solution but not the best
one (I''m working on v2.1 :-))
PointedEars

P.S.
Your line-break is b0rken (I skipped the rewrapping here.) Set it below
80 characters per line, 72-76 is recommended. And if you use automagic
line-break, avoid manual ones in paragraphs.


Thomas ''PointedEars'' Lahn wrote:

I would like to change pictures by going over them with the mouse in lighter
ones.

http://pointedears.de.vu/scripts/test/hoverMe is a solution but not the best
one (I''m working on v2.1 :-))



The route you''ve taken in the 2.0 is a fine one, although I do have some
suggestions, if you like:
- I''d recommend to add some relatedTarget checks in the script,
- I''d also use some container for the images (in order to keep the
namespace as clean as possible).

It makes me think of a script by Gosha Bine, named "eazyroll.js", which
automated rollovers, but using a completely different conception which
you may find interesting[1].

The idea was to add a handler for the mousemove event and study the
target; if it was an image, then there was a check to see if an
alternate image existed, then a source change according name conventions
(the alternate image had to have "_a" as a postfix).

The immediate benefit was the simplicity for the programmer: he/she just
had to insert a SCRIPT include and that was all (no links, no
mouseover/mouseout coding, nothing else). And of course this was working
on major browsers (NN4+, IE4+).
Cheers,
Yep.

[1] I, for sure, was at the time extremely interested! I was then a
beginner in js (not that I''m an expert now), and his scripts made me
make huge progress and, more generally, fed my interest for programming
(I don''t have a technical background). That''s all nostalgy for me, when
I was taking the night bus in the Swedish winter, reading printed
scripts :-)


这篇关于的onmouseover的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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