检测用户何时使用jQuery在输入框上取消注意? [英] Detect when a user unfocuses on an input box using jQuery?

查看:59
本文介绍了检测用户何时使用jQuery在输入框上取消注意?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否可以检测用户何时使用jquery取消输入框?即当他们点击它时会触发一个事件。

Is it possible to detect when the user unfocuses an input box using jquery? I.e when they click off of it an event fires.

推荐答案

我相信 模糊 功能正是您所需要的。

I believe the blur function is what you are looking for.

$( "input[type=text]" ).blur( function() {
    // unfocus event
});

这篇关于检测用户何时使用jQuery在输入框上取消注意?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆