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>