1. 首页
  2. SEO技术

JavaScript decodeURI()函数

gooood个人博客网站

JavaScript

JavaScript decodeURI()函数
decodeURI()函数用于解码URI。
<!DOCTYPE html> <html> <body> <p>Click the button to decode a URI after encoding it.</p> <button>Try it</button> <p></p> <script> function myFunction() { var uri = "my test.asp?name=stale&car=saab"; var enc = encodeURI(uri); var dec = decodeURI(enc); var res = "Encoded URI: " + enc + "<br>" + "Decoded URI: " + dec; document.getElementById("demo").innerHTML = res; } </script> </body> </html>


本文来自SEO排名优化_SEO技术_SEO资讯网,经授权后发布,转载请联系原作者。原文链接:http://www.ylzug.com/js/483.html