加载中...

检查变量的类型


调试运行

<html>
<head>
<title>检查变量的类型</title>
</head>
<body>
<script language="javascript">
<!--
	name = "刘洪辉";
	age  = 22;   
	document.write('name变量的类型是:',typeof(name),'<br>');
	document.write('age变量的类型是:',typeof(age),'<br>');
	document.write('document的类型是:',typeof(document));
//-->
</script>
</body>
</html>

还没有评论.