JS cookie 中文亂碼
function SetCookie(name, value) {
var exp = new Date();
exp.setTime(exp.getTime() + 3 * 24 * 60 * 60 * 1000); //3天過期
document.cookie = name + "=" + escape(value) + ";expires=" + exp.toGMTString();
return true;
};
function getCookie(name) {
var arr = document.cookie.match(new RegExp("(^| )" + name + "=([^;]*)(;|$)"));
if (arr != null) return arr[2]; return null;
};
var currentServiceAliasName = getCookie("appName");
var displayName = "";
if (currentServiceAliasName != null && currentServiceAliasName != "" && currentServiceAliasName != "undefined")
displayName = decodeURIComponent(currentServiceAliasName) + " . " + counterName;
else
displayName = counterName;
decodeURIComponent , 用這個轉換一下;
相關文章
- Cookie值中文亂碼問題Cookie
- jsp 中文亂碼急救JS
- include jsp 中文亂碼JS
- C# 解決httplistener querystring 中文亂碼、返回json中文格式亂碼C#HTTPJSON
- Node.js 中文亂碼解決Node.js
- PHP-json_encode中文亂碼PHPJSON
- 幾種常見的JSP中文亂碼JS
- SpringMVC 使用@ResponseBody返回json 中文亂碼SpringMVCJSON
- jsp頁面中中文亂碼問題JS
- mysql中文亂碼MySql
- secureCRT中文亂碼Securecrt
- oracle 中文亂碼Oracle
- PHP中文亂碼PHP
- gedit中文亂碼
- PLSQL中文亂碼SQL
- JSP頁面裡中文的亂碼問題JS
- java web 中文亂碼JavaWeb
- jsp頁面傳中文到資料庫亂碼JS資料庫
- phantomjs截圖中文亂碼問題解決JS
- 完美解決jspdf各種中文亂碼問題JS
- js解決url傳引數中文亂碼問題JS
- JSP中文亂碼問題終極解決方案JS
- 用記事本解決js中文亂碼問題JS
- Get提交方式中文亂碼
- JD-GUI中文亂碼GUI
- EasyUI 中文亂碼問題UI
- oracle中文顯示亂碼Oracle
- RHEL中文亂碼解決
- HttpClient 解決中文亂碼HTTPclient
- MSSQL中文亂碼問題SQL
- Java 中文 亂碼問題Java
- telnet AIX 中文亂碼AI
- JSP中文亂碼問題終極解決方案(上)JS
- python json.dumps中文亂碼問題解決PythonJSON
- js的url傳遞中文引數亂碼的解決方案JS
- JSP中四種傳遞引數中文亂碼問題JS
- 求助: jspsmartupload 混合上傳的中文亂碼問題!JS
- PHP - 如何解決中文亂碼PHP