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

前端 未结 6 1246
余生分开走
余生分开走 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 09:56

    You can decode the url using javascript Function: decodeURIComponent(Url ); Because Browser encodes the Url for special characters . For example : https://www.example.com is encoded to %20https%3A%2F%2Fwww.example.com. Here the special characters are replaced by % and its ASCI value.

提交回复
热议问题