m***n 发帖数: 36 | 1 【 以下文字转载自 BuildingWeb 讨论区,原文如下 】
发信人: mylon (星愿), 信区: BuildingWeb
标 题: 怎样让鼠标指向文字的时候文字变化 ?
发信站: Unknown Space - 未名空间 (Tue Oct 21 08:57:45 2003) WWW-POST
能 不 能 给 段 简 单 的 代 码 例 子 , 让 鼠 标 器 指 向 文 字 的 时 候 文 字
发 生 变 化 ? 谢 谢 ! |
m******t 发帖数: 2416 | 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 : 能 不 能 给 段 简 单 的 代 码 例 子 , 让 鼠 标 器 指 向 文 字 的 时 候 文 字 : 发 生 变 化 ? 谢 谢 !
|
m***n 发帖数: 36 | 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-)
|
m******t 发帖数: 2416 | 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.
|
m***n 发帖数: 36 | 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 变化?
|
m******t 发帖数: 2416 | 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 : 就 作 的 象 这 个 一 样 , 可 这 个 太 复 杂 了 , 而 且我 看 不 到 它 的 源 : 代 码
|
m***n 发帖数: 36 | 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.
|
m******t 发帖数: 2416 | 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"
|
w******t 发帖数: 1422 | 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.
|
l*********r 发帖数: 80 | 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
|