JavaScript 金字塔

<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title></title>
<script type="text/javascript">

for (var i = 1; i < 20; i++) {
for (var j = 1; j < (2*i-1)+1; j++) {
document.writeln("-");

};
document.writeln("<br/>");
};


</script>

</head>
<body style="text-align: center;">
</body>
</html>

posted on 2016-10-28 15:42  梦想夹带眼泪  阅读(225)  评论(1编辑  收藏  举报

导航