jQuery mouseout() 方法
jQuery 教程
· 2019-03-26 14:13:01
实例
当鼠标指针离开 <p> 元素时,设置背景色为灰色:
$("p").mouseout(function(){
$("p").css("background-color","gray");
});
$("p").css("background-color","gray");
});
定义和用法
当鼠标指针离开被选元素时,会发生 mouseout 事件。
mouseout() 方法触发 mouseout 事件,或添加当发生 mouseout 事件时运行的函数。
注意:与 mouseleave 事件不同,mouseout 事件在鼠标指针离开被选元素或任意子元素时都会被触发,mouseleave 事件只有在鼠标指针离开被选元素时被触发。参见页面底部演示实例。
提示:该事件通常与 mouseover 事件一起使用。
语法
触发被选元素的 mouseout 事件:
$(selector).mouseout()
添加函数到 mouseout 事件:
$(selector).mouseout(function)
| 参数 | 描述 |
|---|---|
| function | 可选。规定 mouseout 事件触发时运行的函数。 |
点击查看所有 jQuery 教程 文章: https://codercto.com/courses/l/35.html
Real-Time Collision Detection
Christer Ericson / CRC Press / 2004-12-22 / USD 98.95
Written by an expert in the game industry, Christer Ericson's new book is a comprehensive guide to the components of efficient real-time collision detection systems. The book provides the tools and kn......一起来看看 《Real-Time Collision Detection》 这本书的介绍吧!