发布网友 发布时间:2022-04-23 06:10
共1个回答
热心网友 时间:2022-04-20 01:29
一:Js的Url中传递中文参数乱码问题,重点:encodeURI编码,decodeURI解码:1.传参页面Javascript 代码:<script type=”text/ javascript ”>// <![CDATA[function send(){var url = "test01.html";var userName = $("#userName").html();window.open(encodeURI(url + "?userName=" + userName)); }// ]]>
GBK与UTF-8的转码:iconv("gbk","utf-8","php中文转码");//把中文gbk编码转为utf8iconv("utf-8","gbk","php中文转码");//把中文utf8编码转为gbk。