js乘法口诀表

下面展示一些 内联代码片

js乘法口诀表
// An highlighted block
<html>
<head>
<title>js九九乘法表</title>
<style type="text/css">
table {
	width: 800px;
	height: 300px;
	border-collapse: collapse;
	font-size:40;
}
table th {
	border: 1px solid #069;
}
body {
	text-align: left;
}
h1 {
	font-family: "微软雅黑", Verdana, sans-serif, "宋体";
	color: #ff0000;
	font-weight: bold;
		font-size:100;
	margin-bottom: 30px;
}
</style>
</head>
<body>
<script type="text/javascript">
	document.write("<table>");
	var str = "js九九乘法表";
	document.write("<h1>" + str + "</h1>");
	for ( var x = 1; x <= 9; x++) {
		document.write("<tr>");
		for ( var y = 1; y <= x; y++) {
			document.write("<th>" + y + "*" + x + "=" + (x * y) + "</th>");
		}
		document.write("</tr>");
	}
	document.write("</table>");
</script>
</body>
</html>

原创文章 15 获赞 7 访问量 2679

猜你喜欢

转载自blog.csdn.net/qq_37141978/article/details/88736477
今日推荐