jQuery focusout() 方法
jQuery 教程
· 2019-03-11 08:57:42
实例
当 <div> 元素或其任意子元素失去焦点时,设置 <div> 元素的背景颜色:
$("div").focusout(function(){
$(this).css("background-color","#FFFFFF");
});
定义和用法
当元素(或在其内的任意元素)失去焦点时发生 focusout 事件。
当在元素或在其内的任意元素上发生 focusout 事件时,focusout() 方法添加要运行的函数。
与 blur() 方法不同的是,focusout() 方法在任意子元素失去焦点时也会触发。
提示:该方法通常与 focusin() 方法一起使用。
语法
$(selector).focusout(function)
参数 | 描述 |
---|---|
function | 可选。规定 focusout 事件发生时要运行的函数。 |
点击查看所有 jQuery 教程 文章: https://www.codercto.com/courses/l/35.html
Head First Mobile Web
Lyza Danger Gardner、Jason Grigsby / O'Reilly Media / 2011-12 / $ 50.84
Despite the huge number of mobile devices and apps in use today, your business still needs a website. You just need it to be mobile. Head First Mobile Web walks you through the process of making a con......一起来看看 《Head First Mobile Web》 这本书的介绍吧!