11.12

使用<c:out>输出
使用表达式输出
使用脚本输出
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>使用JavaScript脚本在页面上显示输出</title>
</head>
<body>
<script type="text/javascript">
document.write("<h1>This is a heading.</h1>");
for (var i = 0; i < 5; i++) {
if (i > 0) {
document.write("<p>This is a par.</p>");
else {
document.write("<p><strong>This is a par.</strong></p>");
}
}
</script>
</body>
</html>
posted @ 2020-11-12 16:54  王昊宁  阅读(56)  评论(0编辑  收藏  举报