1、新建一个html文件,命名为test.html,用于讲解在js如何对url地址进行编码。
3、在script标签内,使用encodeURI方法对url地址进行编码。
5、在浏览器打开test.html文件,查看结果。