coolair
V2EX  ›  问与答

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

  •  
  •   coolair · Apr 19, 2017 · 1334 views
    This topic created in 3428 days ago, the information mentioned may be changed or developed.
    $(':input.invalid').first()这样写不行啊
    1 replies    2017-04-19 13:13:15 +08:00
    Hyeongo
        1
    Hyeongo  
       Apr 19, 2017
    $("input[class='invalid']").first() 这样呢?
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Privacy   ·   Solana   ·   4015 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 32ms · UTC 05:25 · PVG 13:25 · LAX 22:25 · JFK 01:25
    ♥ Do have faith in what you're doing.