题解 | #直角三角形#
直角三角形
https://www.nowcoder.com/practice/7e8a7d83569d49aaa9bc4bb43a9d2d6e
{"html":"<!DOCTYPE html>\r\n<html lang=\"en\">\r\n <head>\r\n <meta charset=\"UTF-8\">\r\n </head>\r\n <body>\r\n <div class='triangle'></div>\r\n <script>\r\n var triangle = document.querySelector('.triangle');\r\n // 补全代码\r\n str = ''\r\n for(var i=0;i<3;i++) {\r\n for(var j=0;j<=i;j++) {\r\n str += '*';\r\n }\r\n str += '</br>';\r\n }\r\n triangle.innerHTML = str;\r\n </script>\r\n </body>\r\n</html>","css":"/* html, body {\\n\\twidth: 100%;\\n\\theight: 100%;\\n\\tmargin: 0;\\n\\tpadding: 0;\\n} */","js":"// 请在这里输入代码"}
前端题目收集 文章被收录于专栏
关于前端题目