jQuery blur () method
Examples
Add the function to the blur event. Occurs when the <input> field loses focus blur event:
$ ( "Input"). Blur (function () {
alert ( "input box lose focus");
});
alert ( "input box lose focus");
});
try it"
Definition and Usage
blur event occurs when the element loses focus.
blur () method triggers the blur event, or when a predetermined function to run when the event occurs blur.
Tip: This method is often associated with focus () for use with the method.
grammar
For the selected elements triggered blur event:
$(Selector) .blur () try
Add the function to the blur event:
$(selector).blur(function)
尝试一下
参数 | 描述 |
---|---|
function | 可选。规定当 blur 事件发生时运行的函数。 |