<!DOCTYPE html><html><head> <meta charset="UTF-8"> <title>Document</title></head><body> <button onclick="buttom()">提交</button> <div id="div1"></div></body><script> function buttom() { var q = ''; var count = 0; for (var i = 20; i <= 80; i++) { if (i % 3 == 0) { q += i if (count % 5 == 0) { console.log(count); document.getElementById('div1').innerHTML = q + "<br/>"; } else { document.getElementById('div1').innerHTML = q; }; count++ }; }; };</script></html>
添加回答
举报
0/150
提交
取消