Uncaught ReferenceError: uneval is not defined
它适用于 Firefox,但不适用于 Google Chrome。
我尝试:
var getSaved = [['ABC', 'http://...'], ['DEF', 'http://...'], ['...etc...']];
var get_saved_items = eval(getSaved);
var name = [], url = [];
for (var i = 0; i < get_saved_items.length; i++) {
name[i].push(get_saved_items[i][0]);
url[i].push(get_saved_items[i][1]);
};
window.localStorage.setItem('saved_name', uneval(name));
window.localStorage.setItem('saved_links', uneval(url));
它返回:Uncaught ReferenceError: uneval is not defined
有什么问题?