代码示例:(标识:vbst_fornext2)
<html>
<body>

<script type="text/vbscript">
for i=1 to 6
 document.write("<h" & i & ">这是标题 " & i & "</h" & i & ">")
next
</script>

</body>
</html>
运行结果: