js让我们一起从基础来学习,我们一点一点的来学习 下边是我写的代码,然后大家看着学习下吧!!! [code lang="js"] <html> <head> <title>js演示</title> </head> <body> <script> document.write('<table border="1" width="100px" align="center">'); var i=0; while(i<100){ if(i%10==0){ if(i%20==0) bg="#cccccc"; else bg="#ffffff"; document.write('<tr onmouseover="show(this)" onmouseout="onshow(this)" bgcolor="'+bg+'">'); } document.write('<td>'+i+'</td>'); i++; if(i%10==0){ document.write("<tr>"); } } document.write("</table>") var ys=null; function show(obj){ ys=obj.bgColor; obj.bgColor="red"; } function onshow(obj){ obj.bgColor=ys; } </script> </body> </html> [/code] 欢迎转载,转载请注明来自微度网络-网络技术中心 http://yun.widuu.com/index.php/archives/303.html

点赞(0) 打赏

评论列表 共有 0 条评论

暂无评论
立即
投稿

微信公众账号

微信扫一扫加关注

发表
评论
返回
顶部