Question mark in the middle of a url variable?

前端 未结 3 449
梦如初夏
梦如初夏 2020-11-30 07:23

If I have a variable to pass through a url and it has a question mark in it, do I just need to escape the question mark? If not how can I make sure it passes through like it

3条回答
  •  眼角桃花
    2020-11-30 07:40

    According to my experience of trying to make a JavaScript search engine that links to Google, just replace the question marks with %3F. A url reads the first two characters on the right of a % as hexadecimal format.

提交回复
热议问题