Recently, I have been learning to use easyi and found that the framework is indeed convenient and concise. Those who can create this framework are at the level of a master, it’s awesome...
When I came across this application today, I could say that I was speechless. I could understand it at first glance when I read the source code, but I still felt very magical before. I often told myself to think more about it. In fact, some of them have indeed thought about it, but the effect is really far-fetched. When I took out the source code, I understood it particularly well. If I could see my expression at this time, it would be a struggle. If quantitative change causes qualitative change, then my quantity is still too poor, and it is not even considered to be knowledgeable. How can I talk about creation?
Let’s first analyze the implementation principle. What is the principle of flickering: In fact, it’s just one. Display frequently alternates between none and block. Do you understand this?
Or just upload the code first:
html part:
<div id="showZone"></div>//Isn't you very familiar with the javascript part: 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";//I still gain something. This writing method must be much simpler than if..else i>8&&clearInterval(timer);//This short circuit classic},80); }; };Although the principle is simple, the code of the predecessor is much simpler than the code I wrote personally, and it is still very rewarding.
Easyi has also entered the study schedule. Every day, the queues are getting fuller... Come on, the stupid birds are flying...