<!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <title></title> </head> <body> </body> </html> <script type="text/javascript"> for (var i = 0; i < 4; i++) { for (var v = 0; v <=i ; v++) { document.write(‘*‘) } document.write("<br/>") } document.write("<br/>"); document.write("<br/>"); document.write("<br/>"); for (var a = 1; a < 5;a ++){ for(var b= 1;b < (5-a); b ++ ){ document.writeln(" "); } for (var c = 1;c <= a;c ++) { document.writeln("*"); } document.write("<br />"); } document.write("<br/>"); document.write("<br/>"); document.write("<br/>"); for (var a = 1; a < 5;a ++){ for(var b= 5;b > (6-a); b -- ){ document.writeln(" "); } for (var c = 1;c <=(5-a);c ++) { document.writeln("*"); } document.write("<br />"); } document.write("<br/>"); document.write("<br/>"); document.write("<br/>"); for (var i = 0; i < 4; i++) { for (var v = 0; v < (4-i) ; v++) { document.write(‘*‘) } document.write("<br/>") } document.write("<br/>"); document.write("<br/>"); document.write("<br/>"); for (var a = 1; a < 5;a ++){ for(var b= 1;b <(5-a); b ++ ){ document.writeln(" "); } for (var c = 1;c <= (2*a-1);c ++) { document.writeln("*"); } document.write("<br />"); } </script>
原文地址:https://www.cnblogs.com/hankai2735/p/8776464.html
时间: 2024-10-09 06:02:32