js判断数据类型的方法( 二 )


6)$.type(function(){})      测试成果:"function"

js判断数据类型的方法



6【$.type()】、【typeof】一部门返回成果的不同, 此处接着上一步演示:
1)null:$.type(null) = "null", typeof null = "object" 
2)date类型:$.type(new Date()) = "date", typeof(new Date()) = "object"
3)array类型:$.type([1, 2]) = "array", typeof([1, 2]) = "object"

js判断数据类型的方法



js判断数据类型的方法



js判断数据类型的方法




以上内容就是js判断数据类型的方法的内容啦, 希望对你有所帮助哦!

猜你喜欢