search

Home  >  Q&A  >  body text

Cannot read property 'trim' of undefined

login:52 Uncaught TypeError: Cannot read property 'trim' of undefined

at dologin (login:52)

at HTMLButtonElement.onclick (login:38)

How to solve this

何人不识君何人不识君2265 days ago1827

reply all(3)I'll reply

  • 何人不识君

    何人不识君2018-09-01 11:55:46

    $ = layui.jquery;

    jquery is written wrong

    I always write it wrong and I also write it wrong


    reply
    0
  • 藏色散人

    藏色散人2018-09-01 11:40:22

    Is this JS? There is no built-in trim method in the JS script, so an error is prompted. You need to write this class or function by hand.

    Or you can refer to this article

    js trim function to delete spaces at both ends


    reply
    0
  • 何人不识君

    There is in jquery

    何人不识君 · 2018-09-01 11:56:28
  • Cancelreply