How can I stop the browser from url-encoding form values on GET

前端 未结 6 1192
余生分开走
余生分开走 2020-11-29 09:20

I have a form with method=\"get\". In the form I need to pass the URL of a CSS file but it is encoding it to http%3A%2F%2Fwww... etc.

Is t

6条回答
  •  有刺的猬
    2020-11-29 10:08

    If you used XMLHttpRequest you can send text without encoding. You can use JavaScript to do that, but remember to set content-type to text/plain.

    content-type: text/plain
    

提交回复
热议问题