摘要: typeof用来检测给定变量的数据类型(也可叫做基本类型,基本数据类型。包含undefined、boolean、string、number、object、function)var message = "so easy";alert(typeof message); //"string"alert(typeof 12); //"number"可以这样记忆:typeof是用来判断不是用new创建的“变量”。instanceof用来检测对象的类型(也可叫做引用类型。包含Object、Array、Date、RegExp、Function、基本 阅读全文
posted @ 2012-12-04 09:34 connie1120 阅读(296) 评论(0) 推荐(1) 编辑