Recently learning to use Easyui, found that the framework used to be convenient and concise, can make this framework is the big God level it, cattle ah ....
Today encountered this application can be said to let me very silent, the whole source to see the understanding, but before it is still feeling very magical, I often tell myself, to use more brains, actually some have thought, but it is very far-fetched, and when the source to see the time but also exceptionally understand, If this time I can see their expression, is probably a tangled bar, if the quantitative change caused by qualitative change, then my quantity is too poor, even the well-informed are not, what to talk about creating AH.
First to analyze the principle of implementation, the principle of flashing is what: in fact, thedisplay in the None and block between the frequent alternating , so you understand it.
Or the code first:
HTML section:
<div style= "Width:50px;height:50px;background-color:cyan;display:block;" id= "Showzone" ></div>// Is it familiar?
JavaScript section:
Window.onload=function () {var Obj=document.getelementbyid ("Showzone"); var timer=null;obj.onclick=function () {var i= 0;clearinterval (timer); Timer=setinterval (function () {obj.style.display=i++%2? " None ":" Block ";//There is a harvest, this is more than if. Else must be a lot simpler i>8&&clearinterval (timer),//The short-circuit with the classic Ah},80);};
Although the principle is simple, but the predecessor of the code than I personally write code to be too much simpler, or very rewarding.
Easyui also entered the study schedule, the day by day is more and more full ah ... Come on, stupid bird fly fly ...