循环产生 HTML 标题循环产生 HTML 标题<html><body> <script type="text/javascript">for (i = 1; i <= 6; i++){document.write("<h" + i + ">这是标题 " + i)document.write("</h" + i + ">")}</script> </body></html>