jQuery mouseup() 方法
jQuery 教程
· 2019-03-26 14:44:43
实例
在 <div> 元素上松开鼠标左键,插入一些文本:
$("div").mouseup(function(){
$(this).after("释放鼠标按钮。");
});
$(this).after("释放鼠标按钮。");
});
定义和用法
当鼠标指针移动到元素上方,并松开鼠标左键时,会发生 mouseup 事件。
mouseup() 方法触发 mouseup 事件,或添加当发生 mouseup 事件时运行的函数。
提示:该方法通常与 mousedown() 方法一起使用。
语法
触发被选元素的 mouseup 事件:
$(selector).mouseup()
添加函数到 mouseup 事件:
$(selector).mouseup(function)
| 参数 | 描述 |
|---|---|
| function | 可选。规定 mouseup 事件触发时运行的函数。 |
点击查看所有 jQuery 教程 文章: https://codercto.com/courses/l/35.html
Agile Web Development with Rails 4
Sam Ruby、Dave Thomas、David Heinemeier Hansson / Pragmatic Bookshelf / 2013-10-11 / USD 43.95
Ruby on Rails helps you produce high-quality, beautiful-looking web applications quickly. You concentrate on creating the application, and Rails takes care of the details. Tens of thousands of deve......一起来看看 《Agile Web Development with Rails 4》 这本书的介绍吧!