1 回答
已采纳
西兰花伟大炮
TA贡献376条经验 获得超318个赞
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta http-equiv="X-UA-Compatible" content="ie=edge"> <title>Document</title> </head> <body> <div class="box" id="box"></div> <script> var thing = ['bread','ofo']; var str = `<li>${thing[0]}<li> <li>${thing[1]}<li>`; document.getElementById('box').innerHTML = str; </script> </body> </html>
欢迎采纳
添加回答
举报
0/150
提交
取消