jQuery API jQuery API 中英文对照版 - jQuery在线查询手册
blur
blur()

触发每一个匹配元素的blur事件。这个函数会调用执行绑定到blur事件的所有函数。

注意:这个函数不会调用相应元素的blur方法!如果需要通过代码来使一个元素获得焦点,必须使用DOM方法,例如:$("#myinput")[0].blur();

返回值:jQuery

示例:

$("p").blur();

HTML 代码:

<p onblur="alert('Hello');">Hello</p>

结果:

alert('Hello');

 
blur()

Trigger the blur event of each matched element. This causes all of the functions that have been bound to that blur event to be executed, and calls the browser's default blur action on the matching element(s). This default action can be prevented by returning false from one of the functions bound to the blur event.

Note: This does not execute the blur method of the underlying elements! If you need to blur an element via code, you have to use the DOM method, eg. $("#myinput")[0].blur();

Return value: jQuery
Example:

 $("p").blur();  
Before:
 <p onblur="alert('Hello');">Hello</p>  
Result:
 alert('Hello');