javascript也玩php的var_dump查看变量内容
function var_dump(o){var str = [];var pre = '';typeof o == 'function' && '';typeof o == 'string' ? alert(o) : alert(each.call(o));function each(o){for (var p in this) {typeof this == 'object' && (pre += '[' + p + '].', each.call(this)) || str.push(pre + '[' + p + ']->[' + this + '] /r/n')}return str.join('');}}
页:
[1]