函数传参参数含有空格怎么办

js 方法传参有时候会遇到空格,空格会报错,因为它会默认空格后是元素

解决方法就是使用 escape 和 unescape

使用:filepath= escape(row.filepath);//编码

           filepath= unescape(filepath);//解码

猜你喜欢

转载自blog.csdn.net/weixin_42217154/article/details/109854513