当我点击提交按钮时,网址为:
http://localhost/college/index.php?field=1&exam=ATMA&submit3=%23success
我想用以下内容替换此链接:
http://localhost/college/index.php?field=1&exam=ATMA&submit3=#success
我该怎么做?
答案 0 :(得分:2)
您正在寻找的功能是
PHP:
urlencode($string);
urldecode($string);
使用Javascript:
decodeURIComponent(string);
encodeURIComponent(string);
答案 1 :(得分:0)
尝试以下decodeURIComponent
:
decodeURIComponent('http://localhost/college/index.php?field=1&exam=ATMA&submit3=%23success')