lbfeng
V2EX  ›  jQuery

jquery selector "Syntax error, unrecognized expression selector"

  •  
  •   lbfeng · Mar 23, 2016 · 3281 views
    This topic created in 3894 days ago, the information mentioned may be changed or developed.

    $('#Company/Organization_1')

    如何能处理‘/’, 还是必须改 id.

    3 replies  •  2016-03-23 11:26:32 +08:00
    airyland
    airyland
    Mar 23, 2016 via iPhone
    1
    既然用了下划线,为什么又要用斜线?
    lbfeng
    lbfeng
    OP
    Mar 23, 2016
    2
    @airyland Company or Organization
    mcfog
    mcfog
    Mar 23, 2016
    3
    反斜杠 escape 啊

    $('#Company\\/Organization_1')
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Privacy   ·   Solana   ·   4223 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 26ms · UTC 06:00 · PVG 14:00 · LAX 22:00 · JFK 01:00
    ♥ Do have faith in what you're doing.