var s:String = ExternalInterface.call("document.cookie.toString");
通常會處理一下
var cookieStr:String = ExternalInterface.call("document.cookie.toString");
var cookieObj:Object = {};
cookieStr = cookieStr.split(' ').join('');
var tmp:Array = cookieStr.split(';');
for(var i in tmp) {
var tmp2:Array = tmp[i].split('=');
cookieObj[tmp2[0]] = unescape(tmp2[1]);
}
s_txt.text = cookieObj['PHPSESSID'];
沒有留言:
張貼留言