<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>数据类型</title>
</head>
<body>
<script type="text/javascript">
//javascript中,只有var一种数据类型,可以储存任何一种值
var str="hello,word!";
var str1=0;
document.write(str);
document.writeln(str1);
//for循环输出10次hello,word
for(var i=0;i<10;i++){
document.write(i+"."+str+"<br />");
}
</script>
</body>
</html>
<html>
<head>
<meta charset="UTF-8">
<title>数据类型</title>
</head>
<body>
<script type="text/javascript">
//javascript中,只有var一种数据类型,可以储存任何一种值
var str="hello,word!";
var str1=0;
document.write(str);
document.writeln(str1);
//for循环输出10次hello,word
for(var i=0;i<10;i++){
document.write(i+"."+str+"<br />");
}
</script>
</body>
</html>