V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
coolair
V2EX  ›  问与答

怎么用 jQuery 查找 invalid 的 input/select/textarea 的第一个元素?

  •  
  •   coolair · 2017-04-19 12:21:37 +08:00 · 1017 次点击
    这是一个创建于 3166 天前的主题,其中的信息可能已经有所发展或是发生改变。
    $(':input.invalid').first()这样写不行啊
    1 条回复    2017-04-19 13:13:15 +08:00
    Hyeongo
        1
    Hyeongo  
       2017-04-19 13:13:15 +08:00
    $("input[class='invalid']").first() 这样呢?
    关于   ·   帮助文档   ·   自助推广系统   ·   博客   ·   API   ·   FAQ   ·   Solana   ·   4657 人在线   最高记录 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 30ms · UTC 09:40 · PVG 17:40 · LAX 01:40 · JFK 04:40
    ♥ Do have faith in what you're doing.