[JavaScript]Diamond for your darling

简介:

代码不见得是最优的写法,在网速慢的时候可能会有延时,欢迎批评指正:)

1
2
3
4
5
6
7
8
9
10
11
12
13
14
<script language= "javascript" >
     var  count = 1;
     addEvent(window, "load" , diamond);
     
     function  diamond() {
        setTimeout( "setInterval(setImage, 50)" ,2000);
     }
 
     function  setImage() {
         document.images.diamond.src = "http://images.cnblogs.com/cnblogs_com/justinw/229829/o_dd."  + count + ".png" ;
        count ++;
         if  (count  > 15) count  = 1;
     }
</script> 本文转自Justin博客园博客,原文链接:http://www.cnblogs.com/justinw/archive/2010/03/28/1698684.html,如需转载请自行联系原作者
相关文章
|
JavaScript Windows
Node Sass could not find a binding for your current environment: Windows 64-bit with Node.js 1x.x
Node Sass could not find a binding for your current environment: Windows 64-bit with Node.js 1x.x
102 0
|
JavaScript 前端开发
.bezierEasingMixin(); ^ Inline JavaScript is not enabled. Is it set in your op..
.bezierEasingMixin(); ^ Inline JavaScript is not enabled. Is it set in your op..
240 0
|
JavaScript Windows
jeecg:Node Sass could not find a binding for your current environment: Windows 64-bit with Node.js
jeecg:Node Sass could not find a binding for your current environment: Windows 64-bit with Node.js
210 0
|
Web App开发 缓存 移动开发
Call Me By Your Name - node.js的小美好
node的出现,真是让用惯js的前端工程师遇见了爱情,进而大踏步的走向了后端,尽管有时候会被质疑,不被理解。那又有什么关系。
1656 0
|
JavaScript 前端开发 Go
转:Build Your First JavaScript Library
http://net.tutsplus.com/tutorials/javascript-ajax/build-your-first-javascript-library/   Step 1: Creating the Library Boilerplate We’ll start with...
811 0
|
JavaScript 前端开发 Go
Know Your JavaScript (Injections)
HTML injection vulnerabilities make a great Voigt-Kampff test for proving you care about security.
926 0
|
JavaScript 前端开发 PHP
Make your pages load faster by combining and compressing javascript and css files
from: http://rakaz.nl/item/make_your_pages_load_faster_by_combining_and_compressing_javascript_and_css_files //...
1013 0
|
2月前
|
JavaScript 前端开发
JavaScript中的原型 保姆级文章一文搞懂
本文详细解析了JavaScript中的原型概念,从构造函数、原型对象、`__proto__`属性、`constructor`属性到原型链,层层递进地解释了JavaScript如何通过原型实现继承机制。适合初学者深入理解JS面向对象编程的核心原理。
36 1
JavaScript中的原型 保姆级文章一文搞懂
|
6月前
|
JavaScript Java 测试技术
基于springboot+vue.js+uniapp的客户关系管理系统附带文章源码部署视频讲解等
基于springboot+vue.js+uniapp的客户关系管理系统附带文章源码部署视频讲解等
118 2
|
2月前
JS+CSS3文章内容背景黑白切换源码
JS+CSS3文章内容背景黑白切换源码是一款基于JS+CSS3制作的简单网页文章文字内容背景颜色黑白切换效果。
23 0