标签:
<script type="text/javascript"> var sum=0; var wite; for (var i = 1; i < 10; i++){ var div=$(‘<div class="class‘+i+‘"></div>‘); $("body").append(div); for(var j = i; j > 0; j--){ sum = j * i; wite = (j+"X"+i+"="+sum); div.prepend($(‘<span style="padding-right:10px">‘+wite+‘</span>‘)); } } </script>
实现结果如图所示:
标签:
原文地址:http://www.cnblogs.com/moqiutao/p/5323160.html