jQuery API 返回首页目录 | jQuery API 中英文对照版
blur(fn)

blur(fn)

在每一个匹配元素的blur事件中绑定一个处理函数。

返回值:jQuery

参数:

  • fn (Function): 在每一个匹配元素的blur事件中绑定的处理函数。

示例:

$("p").blur( function() { alert("Hello"); } );

HTML 代码:

<p>Hello</p>

结果:

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

 
blur(fn)

Bind a function to the blur event of each matched element.

Return value: jQuery
Parameters:

  • fn (Function): A function to bind to the blur event on each of the matched elements.

Example:

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


相关链接
asp之家 | jQuery官方网站 | jQuery中文网 | 电子书作者网站 | 电子书作者blog