html l在JavaScript.html中运行类型

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了html l在JavaScript.html中运行类型相关的知识,希望对你有一定的参考价值。

<!DOCTYPE html>
<html>
<head>
	<title>L'operatore typeof in JavaScript</title>
	<script type="text/javascript">
	var a = 1;
	document.write("<p>La variabile a è di tipo " + typeof a + "</p>");
	var b = "gatto";
	document.write("<p>La variabile b è di tipo " + typeof b + "</p>");
	var c = "";
	document.write("<p>La variabile c è di tipo " + typeof c + "</p>");
	var d = false;
	document.write("<p>La variabile d è di tipo " + typeof d + "</p>");
	var e;
	document.write("<p>La variabile e è di tipo " + typeof e + "</p>");
	var f = ["rosso", "verde", "blu"];
	document.write("<p>La variabile f è di tipo " + typeof f + "</p>");
	var g = new Date();
	document.write("<p>La variabile g è di tipo " + typeof g + "</p>");
	</script>
</head>
<body>

</body>
</html>

以上是关于html l在JavaScript.html中运行类型的主要内容,如果未能解决你的问题,请参考以下文章