利用location.href跳转页面传值(中文),乱码问题
之前做了一个博客跳转页面,用onclick事件响应跳转到编辑页面时,出现乱码,解决办法用encodeURI()进行编码,
用decodeURI() 函数对encodeURI() 函数编码过的 URI 进行解码。
第一个页面:
window.location.href = "editBlog.html?title=" + encodeURI(obj.title) +
"&tag="...
原创
2019-03-29 17:26:56 ·
1476 阅读 ·
0 评论