编程学问
  • 文章
  • 问题
  • 读书
  • 关于
  • 登录
jQuery API 开发手册

返回值:jQueryfirst()

V1.4概述

获取第一个元素

示例

描述:

获取匹配的第一个元素

HTML 代码:
<ul>
    <li>list item 1</li>
    <li>list item 2</li>
    <li>list item 3</li>
    <li>list item 4</li>
    <li>list item 5</li>
</ul>
jQuery 代码:
$('li').first()
结果:
[ <li>list item 1</li> ]
相关文章
jquery click点击事件后location.href页面不跳转的问题jquery easyui textbox 文本框 jquery easyui pagination 分页 jquery easyui combogrid 数据表格下拉框 jquery easyui portal 门户 andself jquery提交bug及获取更新 jquerychildren expr jqueryfirst jquery first child jquery first jqueryjquery.merge first second jqueryjquery first jquery first childjquery first of typejquery firstjquery $.merge first second php vector removes and returns the first valuephp yp/nis 函数 returns the first key value pair from the named mapphp pht queue returns the first value from a queue
关注编程学问公众号
编程学问网 湘ICP备20001732号