Undefined 类型:包含 undefined 值的变量与尚未定义的变量还是不一样的

2017-06-14 14:04:00
admin
原创
530
<!DOCTYPE html>
<html>
	<head>
		<title>
			Undefined Example 3
		</title>
		<script type="text/javascript">
			var message; //this variable is declared but has a value of undefined
			//make sure this variable isn't declared
			//var age
			alert(message); //"undefined"
			alert(age); //causes an error
		</script>
	</head>
	<body>
	</body>
</html>
  • QQ讨论群
  • 关注微信
    • 欢迎咨询
    • 欢迎加入QQ群 16506021
  • 公众号:源宝网络