javascript中的var_dump()
alert(var_dump(变量名))function var_dump(obj) { if(typeof obj == "object") { return "Type: "+typeof(obj)+((obj.constructor) ? "\nConstructor: "+obj.constructor : "")+"\nValue: " + obj; } else { return "Type: "+typeof(obj)+"\nValue: "+obj; }}//end function var_dump
用法:
标签:Javascript, js