<! doctype html> <html lang = "en"> <head> <meta charset = "utf-8"> <title> 문서 </title> <style> .box2 {} .box2 {width : 200px; 높이 : 200px; 배경 : 빨간색; Border-Radius : 50%; 위치 : 상대;} .box3 {너비 : 800px; 높이 : 500px; 테두리 : 1px solid red;} </style> </head> <body> <버튼 유형 = ""id = "start"> </button> <버튼 유형 = ""id = "spop"> 停止 </button> <div> <div id = "box"> </div> </div> </div> <script type = "text/javascript"> var lr = 600; var tb = 300; var i = 0; var j = 0; var box = document.getElementById ( 'box'); var start = document.getElementById ( 'start'); var stop = document.getElementById ( 'stop'); start.onclick = function () {start.style.display = 'none'; stop.style.display = '인라인'; var time = setInterVal (function () {box.style.left = i+'px'; box.style.top = j+'px'; if (i> lr) {lr = 0; i-;} if (i <= lr) {lr = 600; i ++;} if (j> tb) {j <<tb)} if (j <<tb)} if (j}). tb = 300; j ++} function () {stop.style.display = 'none'; } </script> </html>以上就是小编为大家带来的 JavaScript av av, 希望大家多多支持武林网 ~