常见问题汇总(三)——关于浏览器

1 浏览器显示乱码问题

浏览器http中get请求参数默认以ISO-8859-1编码形式传递,对于中文参数,需要用new String(param.getByte(“iso-8859-1”),”utf-8”)来获取,上传需要new String(param.getBytes(“utf-8”),“iso-8859-1”).

2 在cookie中存入中文

Cookie对象默认以ASCII编码存储,不能直接存入中文

3 Chrome浏览器使用swfobject.swf,uploadify等无法正常播放

http://blog.csdn.net/w405722907/article/details/77648593?locationNum=5&fps=1

4 PC与移动端兼容

https://blog.csdn.net/maodoudou1217/article/details/51241725


猜你喜欢

转载自blog.csdn.net/qq_35813653/article/details/80631890