JS代码
<script> window.onload = function(){ var oTable = document.getElementsByTagName("table")[0]; var sColor =["0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "A", "B", "C", "D", "E", "F"]; for(var i=1; i<10; i++){ var oTr = document.createElement("tr"); for(var j=1; j<10; j++){ var nColor = "#"; for(var n=0; n<6; n++){ var nRandom = parseInt(Math.random()*sColor.length); nColor += sColor[nRandom]; } if(j<=i){ var oTd = document.createElement("td"); oTd.innerHTML = j +"*"+i+"="+i*j; oTd.style.backgroundColor = nColor; } oTr.appendChild(oTd); } oTable.appendChild(oTr); } } </script>
售后客服微信:guomanqing1314
微信扫码加好友:
关注公众号:不定期分享免费源码、自媒体工具、壁纸等
其他咨询和服务:
邮箱:1206995177@qq.com
手机:18005151538