<div class="htmlarea"> <textarea id="runcode66834"> <title>JS로 구현한 테이블</title> </textarea> <br><input onclick="runEx('runcode66834')" type="button" value="运行代码"><input onclick="doCopy('runcode66834')" type="button" value="复制代码"> <input onclick="doSave(runcode66834)" type="button" value="保存代码"> <a href="http://www.jb51.net/article/23421.htm" title="查看具体详情" target="_blank">[Ctrl A 모두 선택 참고: </a>외부 J를 도입해야 하는 경우 실행하려면 새로 고쳐야 합니다 </div>]<script type="text/javascript"> document.write('<table border="1" width="800" align="center">'); var i=0; while(i<1000){ if(i%10==0){ if(i%20==0) bg="#cccccc"; else bg="#ffffff"; document.write('<tr onmouseover="show(this)" onmouseout="noshow(this)" bgcolor="'+bg+'">') } document.write('<td>'+i+''); i++; //document.write(''); } if(i%10==0){ document.write(''); } document.write(''); var ys=null; function show(obj){ ys=obj.bgColor; obj.bgColor="red"; } function noshow(obj){ obj.bgColor=ys; } </script>