jQuery API | 返回首页目录 | jQuery API 中英文对照版 |
contains(str) |
contains(str)
把元素集合筛选为包含指定文本(区分大小写)的元素。 返回值:jQuery 参数:
示例: $("p").contains("test") HTML 代码: <p>This is just a test.</p><p>So is this</p> 结果: [ <p>This is just a test.</p> ] Filter the set of elements to those that contain the specified text. Return value: jQuery
Example: $("p").contains("test")Before: <p>This is just a test.</p><p>So is this</p>Result: [ <p>This is just a test.</p> ] |