javascript中的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用法:

alert(var_dump(变量名))

 

标签:Javascript, js

评论当前被关闭。

Deepseath Modified from Green Hope Theme · Proudly powered by WordPress · 津ICP备09005418号-1  津公网安备 12010302001005号