【生成考试分数】JS 20190605
<!--教师之路 start--> <div id="jszl"> <div class="bjpbs-title"><span></span>育德园师14年教学历程 助力7800+考生开启教师之路<span></span></div> <div class="content"> <div class="left"> <ul class="title"> <li>分享一</li> <li>分享二</li> <li>分享三</li> </ul> <div class="cl"></div> <div class="main"> <div class="player"> <img src="./img/bjpbs_demo_player.jpg" alt=""> </div> </div> <div class="bottom"> <h6>优秀学员</h6> <p>讲述从学习到通关技巧</p> </div> </div> <div class="right"> <div class="title"> <h6>学员成绩展示</h6> </div> <table> <tr> <th>用户名</th> <th>综合素质</th> <th>教育知识与能力</th> <th>学科知识与能力</th> </tr> </table> </div> </div> </div> <script> var names = ['李','王','张','刘','陈','杨','赵','黄','周','吴', '徐','孙','胡','朱','高','林','何','郭','马','罗', '梁','宋','郑','谢','韩','唐','冯','于','董','萧', '程','曹','袁','邓','许','傅','沈','曾','彭','吕', '苏','卢','蒋','蔡','贾','丁','魏','薛','叶','阎', '余','潘','杜','戴','夏','钟','汪','田','任','姜', '范','方','石','姚','谭','廖','邹','熊','金','陆', '郝','孔','白','崔','康','毛','邱','秦','江','史', '顾','侯','邵','孟','龙','万','段','漕','钱','汤', '尹','黎','易','常','武','乔','贺','赖','龚','文']; for(let i = 0;i<13;i++){ let min = 72; let max = 98; let marks1 = Math.round(min + Math.random()*(max-min+1)); let marks2 = Math.round(min + Math.random()*(max-min+1)); let marks3 = Math.round(min + Math.random()*(max-min+1)); let num = Math.round(Math.random()*100); let html = '<tr><td>' + names[num] + '**</td><td>' + marks1 + '</td><td>' + marks2 + '</td><td>' + marks3 + '</td></tr>' $("#jszl .right table").append(html); } </script> <!--教师之路 end-->
自写备用