Why is my jquery input mask not working?

前端 未结 3 1697
失恋的感觉
失恋的感觉 2021-01-22 19:56

I am trying to use the jQuery input mask plug-in (jquery.maskedinput-1.3.min.js), and I have searched for several examples/solutions, and my code is exactly as other working exa

3条回答
  •  庸人自扰
    2021-01-22 20:27

    jQuery selectors follow the standard CSS syntax, so the space in the middle of your ID is actually being treated as a descendant selector. Make your life easier: when dealing with jQuery, keep your IDs and classes limited to alphanumerics, hyphen and that's about it.

    To clarify: there is a quote/escape syntax in jQuery, but IMHO it's too annoying to deal with, hence I'm not even giving an example of it.

提交回复
热议问题