我是靠谱客的博主 冷艳香烟,这篇文章主要介绍typeof的类型,现在分享给大家,希望可以做个参考。

 typeof返回的是字符串,有六种,分别为:
 "number","string","boolean","object","function","undefined"

<HEAD>
<TITLE> New Document </TITLE>
</HEAD>  
<BODY>
<script>
 var str;
 if(typeof(str)=="undefined"){
  alert("111");
 }
 if(typeof(str)==undefined){
  alert("222");
 }
 alert(typeof(str));

 //typeof返回的是字符串,有六种,分别为:
 //"number","string","boolean","object","function","undefined"
</script>
</BODY>
</HTML>

最后

以上就是冷艳香烟最近收集整理的关于typeof的类型的全部内容,更多相关typeof内容请搜索靠谱客的其他文章。

本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
点赞(114)

评论列表共有 0 条评论

立即
投稿
返回
顶部