JavaScript for 循环标题【每日一段代码56】

<html>
<body>
<script type="text/javascript">
for (i=1; i<5; i++)
{
document.write("<h" +i+ ">这是标题" +i+ "<h" +i+ ">");
document.write("<br>");
}
</script>
</body>
</html>

posted on 2012-03-21 22:00  Cosimo  阅读(232)  评论(0编辑  收藏  举报

导航