coolair
V2EX  ›  问与答

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

  •  
  •   coolair · Apr 19, 2017 · 1393 views
    This topic created in 3458 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   ·   6232 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 36ms · UTC 03:03 · PVG 11:03 · LAX 20:03 · JFK 23:03
    ♥ Do have faith in what you're doing.