search

Home  >  Q&A  >  body text

javascript - How to get the Chinese parameter value on the address bar, code it in the JS page, and use it normally?


The first picture is the Chinese parameters passed from the previous page

The second picture is the current page from Parameters obtained from the address bar

学习ing学习ing2750 days ago833

reply all(3)I'll reply

  • 迷茫

    迷茫2017-06-28 09:28:17

    Try decodeURI or decodeURIComponent, otherwise it’s an encoding problem

    reply
    0
  • 代言

    代言2017-06-28 09:28:17

    reply
    0
  • 代言

    代言2017-06-28 09:28:17

    Use encodeURIComponent (parameter) to encode before jumping

    Use decodeURIComponent (parameter) to decode after the jump

    reply
    0
  • Cancelreply