<! DOCTYPE html><html> <head> <meta charset="UTF-8"> <title></title> <style type="Text/css"> . Container { float: Left ; font-size: 32px; } . Container span { display: inline-block; width: 32px; } </style> </head> <body> <!--<div class= "container" ><script type= "Text/javascript" >For (Var i=0;i<4;i++) {//Output spacesFor (Var j=0;j<4-i-1;j++) {document.write ("<span></span>"); } //output *For (Var j=0;j<2*i+1;j++) {document.write ("<span>*</span>"); } //Line breakdocument.write ("<br/>"); } For (Var i=0;i<3;i++) {//Output spacesFor (Var j=0;j<i+1;j++) {document.write ("<span></span>"); } //output *For (Var j=0;j<5-2*i;j++) {document.write ("<span>*</span>"); } //Line breakdocument.write ("<br/>"); } </script></div>--> <script type= "Text/javascript" > for (var x =< Span class= "javascript" > 0;< Span class= "javascript" > x < 30 ; x++) {< /span> document . write ( " <div class= ' container ' > ") for (var i =< Span class= "javascript" > -3< Span class= "P"; i <= 3 i++) {< /span> var absi = math. Abs (i for (var j =< Span class= "javascript" > 0;< Span class= "javascript" > j < absi; j++) { document. Write("<span></span>"); } For(Var j = Span class= "Mi" >0; Span class= "NX" >j < 7 - 2 * absi; j++) { if (j==0< Span class= "O" >| | j==7 -2* Absi-1) document. Write("<span>*</span>"); Else document. Write("<span></span>"); } document. Write("<br/>"); } document. Write("</div>") } </script> </body> </html>
JS Diamond Cutout