V2EX = way to explore
V2EX 是一个关于分享和探索的地方
Sign Up Now
For Existing Member  Sign In
coolair
V2EX  ›  问与答

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

  •  
  •   coolair · Apr 19, 2017 · 1110 views
    This topic created in 3297 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   ·   Solana   ·   3998 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 33ms · UTC 04:11 · PVG 12:11 · LAX 21:11 · JFK 00:11
    ♥ Do have faith in what you're doing.