function type(target) {
var templet ={
"[object Array]" : "arry";
"[object Object]" : "object";
"[object Number]" : "number_object";
"[objecct Boolean]" : "boolean_object";
"[object String]" : "String_object";
}
if(target === null){
return "null";
}
if(typeof(target)=="object"){
var str = Object.portotype.toString.ccall(target);
return templet[str];
}else if(){
return typeof(target);
}
}
原文:https://www.cnblogs.com/sanxin-student/p/12884128.html