Redian新闻
>
[转载] 怎样让鼠标指向文字的时候文字变化 ?
avatar
[转载] 怎样让鼠标指向文字的时候文字变化 ?# Java - 爪哇娇娃
m*n
1
【 以下文字转载自 BuildingWeb 讨论区,原文如下 】
发信人: mylon (星愿), 信区: BuildingWeb
标 题: 怎样让鼠标指向文字的时候文字变化 ?
发信站: Unknown Space - 未名空间 (Tue Oct 21 08:57:45 2003) WWW-POST
能 不 能 给 段 简 单 的 代 码 例 子 , 让 鼠 标 器 指 向 文 字 的 时 候 文 字
发 生 变 化 ? 谢 谢 !
avatar
m*t
2


You know you are going to get totally different answers from this board
and BuildingWeb, right? 8-)

【在 m***n 的大作中提到】
: 【 以下文字转载自 BuildingWeb 讨论区,原文如下 】
: 发信人: mylon (星愿), 信区: BuildingWeb
: 标 题: 怎样让鼠标指向文字的时候文字变化 ?
: 发信站: Unknown Space - 未名空间 (Tue Oct 21 08:57:45 2003) WWW-POST
: 能 不 能 给 段 简 单 的 代 码 例 子 , 让 鼠 标 器 指 向 文 字 的 时 候 文 字
: 发 生 变 化 ? 谢 谢 !

avatar
m*n
3
But I have not got any answer till now.

【在 m******t 的大作中提到】
:
: 字
: You know you are going to get totally different answers from this board
: and BuildingWeb, right? 8-)

avatar
m*t
4

Maybe because people don't know what you are talking about? 8-)
Like, what kind of 代码? what 文字? how to 变化?

【在 m***n 的大作中提到】
: But I have not got any answer till now.
avatar
m*n
5
http://www.ullberg.net/siteinfo/index.html
就 作 的 象 这 个 一 样 , 可 这 个 太 复 杂 了 , 而 且我 看 不 到 它 的 源
代 码

【在 m******t 的大作中提到】
:
: Maybe because people don't know what you are talking about? 8-)
: Like, what kind of 代码? what 文字? how to 变化?

avatar
m*t
6

It's javascript. You can see the source code by replacing "index" with "main"
in the link above.

【在 m***n 的大作中提到】
: http://www.ullberg.net/siteinfo/index.html
: 就 作 的 象 这 个 一 样 , 可 这 个 太 复 杂 了 , 而 且我 看 不 到 它 的 源
: 代 码

avatar
m*n
7
But the code is too complicated.
If I only want to show one text or picture, and
when the mouse moves on it, it changes into another
picture or different work. How should I do?
I am a beginner. Thanks!


"main"

【在 m******t 的大作中提到】
:
: It's javascript. You can see the source code by replacing "index" with "main"
: in the link above.

avatar
m*t
8

I'm not a javascript expert, so I can only tell you you want to use a "mouse
move" event handler and change the image name or the text when the mouse
cursor is moved over the image or text you want to change.

【在 m***n 的大作中提到】
: But the code is too complicated.
: If I only want to show one text or picture, and
: when the mouse moves on it, it changes into another
: picture or different work. How should I do?
: I am a beginner. Thanks!
:
: 源
: "main"

avatar
w*t
9
I assume you want to implement that using javascript.
goole it using rollover (for image) - you will get plenty of clues, note to
preload images so that rollover effect is immediate.
for text, using stylesheet, the idea is when mouse over, using a different
class for the text
should be easy

【在 m******t 的大作中提到】
:
: I'm not a javascript expert, so I can only tell you you want to use a "mouse
: move" event handler and change the image name or the text when the mouse
: cursor is moved over the image or text you want to change.

avatar
l*r
10
· onMouseOver
· onMouseDown
· onMouseUp
· onMouseMove
· onKeyDown
· onKeyUp
· onKeyPress
· onMove (netscape only)
· onResize (netscape only)
sample:

Example of document object model

Move the mouse over the image below, and you will see a second image
appear!







"mouse

【在 w******t 的大作中提到】

: I assume you want to implement that using javascript.
: goole it using rollover (for image) - you will get plenty of clues, note to
: preload images so that rollover effect is immediate.
: for text, using stylesheet, the idea is when mouse over, using a different
: class for the text
: should be easy

相关阅读
logo
联系我们隐私协议©2024 redian.news
Redian新闻
Redian.news刊载任何文章,不代表同意其说法或描述,仅为提供更多信息,也不构成任何建议。文章信息的合法性及真实性由其作者负责,与Redian.news及其运营公司无关。欢迎投稿,如发现稿件侵权,或作者不愿在本网发表文章,请版权拥有者通知本网处理。