read: function(key) {
if (!this._inited) {
throw new Error('Please initialize before reading.');
}
return this._data[key];
},
write: function(key, value) {
var str = [];
if (!this._inited) {
throw new Error('Please initialize before writing.');
}
this._data[key] = value;
for (var k in this._data) {
str.push(escape(k) + ':' + escape(this._data[k]));
}
window.name = str.join('|');
}
};
新闻热点
疑难解答