jQuery API | 返回首页目录 | jQuery API 中英文对照版 |
select |
select()
触发每一个匹配元素的select事件。这个函数会调用执行绑定到select事件的所有函数。 返回值:jQuery 示例: $("p").select(); HTML 代码: <p onselect="alert('Hello');">Hello</p> 结果: alert('Hello'); Trigger the select event of each matched element. This causes all of the functions that have been bound to that select event to be executed, and calls the browser's default select action on the matching element(s). This default action can be prevented by returning false from one of the functions bound to the select event. Return value: jQuery $("p").select(); Before: <p onselect="alert('Hello');">Hello</p>Result: alert('Hello'); |