当前位置:
代码迷
>>
综合
>> 虚拟定位助手教程
详细解决方案
虚拟定位助手教程
热度:
83
发布时间:
2023-09-08 19:15:20.0
虚拟定位助手教程
<html> <head> <meta name="GENERATOR" content="Microsoft FrontPage 6.0"> <meta name="ProgId" content="FrontPage.Editor.Document"> <meta http-equiv="Content-Type" content="text/html; charset=gb2312"> <title>页页装载效果</title> </head> <body> <style type="text/css"> #color div { width:5px; height:5px; float:left; margin:0 2px; } </style> <div id="color"> <div style="background:'gray'"></div> <div style="background:'gray'"></div> <div style="background:'gray'"></div> <div style="background:'gray'"></div> <div style="background:'gray'"></div> <div style="background:'gray'"></div> </div> <script> var v=document.getElementsByTagName('div'); var i=v.length-1; function chg_col(){ q=(i<=1)?v.length-1:i-1 document.getElementsByTagName('div')[q].style.background="gray" document.getElementsByTagName('div')[i].style.background="red" i=(i>=v.length-1)?1:i+1 setTimeout("chg_col()",200) } chg_col() </script> </body> </html>
[Ctrl+A 全选 注:如需引入外部Js需刷新才能执行]
虚拟定位助手教程
查看全文
相关解决方案