JavaScript手册 
目录
此参考中包含
的内容
轻松上手
简介
操作符
语句
核心
文档
窗口
表单
浏览器
事件和
事件句柄
LiveWire
数据库服务
进程管理服务
实用工具
全局函数
LiveConnect
的Java包
索引
 
 
【目录】 【上一页】 【下一页】 【索引】

onMouseOver

Executes JavaScript code when a MouseOver event occurs; that is, once each time the mouse pointer moves over an object or area from outside that object or area.

事件适用对象Layer, Link
实现版本Navigator 2.0
Navigator 3.0: event handler of Area

语法

onMouseOver="handlerText"

参数

handlerTextJavaScript 代码或对一个 JavaScript 函数的调用。

描述

If the mouse moves from one area into another in a client-side image map, you'll get onMouseOut for the first area, then onMouseOver for the second.

Area objects that use onMouseOver must include the HREF attribute within the AREA tag.

You must return true within the event handler if you want to set the status or defaultStatus properties with onMouseOver.

使用的事件属性

type标明了事件的类型。
target标明了事件原来发送的对象。
layerX, layerY,
pageX, pageY,
screenX, screenY
Represent the cursor location at the time the MouseOver event occurred.

示例

By default, the HREF value of an anchor displays in the status bar at the bottom of the browser when a user places the mouse pointer over the anchor. In the following example, onMouseOver provides the custom message "Click this if you dare."

<A HREF="http://home.netscape.com/"
   onMouseOver="window.status='Click this if you dare!'; return true">
Click me</A>
See onClick for an example of using onMouseOver when the A tag's HREF attribute is set dynamically.

See also示例 for Link.

参看

onMouseOut

要获得关于事件句柄的常规信息,请看“事件的常规信息”

要获得关于事件对象的信息,请看事件


【目录】 【上一页】 【下一页】 【索引】

回页面顶部