coolair
V2EX  ›  问与答

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

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