Spit Groove Section:
Changes in demand are ever-changing, at least until you convince the person who you're dealing with.
Startups are like this, product manager an idea, is to change the change, you change the complexity is not complex, in their eyes are very simple.
Today, a small change in demand, the activity of the countdown to a cycle of 30 minutes countdown, yes, is a cycle of 30 minutes countdown, this activity is endless.
Technical section:
Html
1 <P>Red Envelope expiry date:2 <!--2. Countdown HTML -3 <spanID= "Minute">00</span>points4 <spanID= "Second">00</span>seconds5 </P>
Js
1<!--3. Countdown js-->2<script type= "Text/javascript" >3 varminute = "29";4 varSecond = 59;5SetInterval (function() {6second--;7 if(second = = XX && minute = = 00) {8minute = 29;9Second = 59;Ten};//when the minutes and seconds are 00 o'clock, the value is re-given One if(Second = = 00) { ASecond = 59; -minute--; - if(Minute <) minute = "0" +minute; the};//when the second is 00 o'clock, the number of seconds is given back to the value - if(Second <) Second = "0" +second; -$ ("#minute"). text (minute); -$ ("#second"). Text (second); +}, 1000); -</script>
All code
1<! DOCTYPE html>23 45<meta charset= "UTF-8" >6<title></title>7<!--1. Introduction of Jq-->8<script src= "Http://code.jquery.com/jquery-latest.js" ></script>9Ten One<body> A<p>Red Envelope expiry date: -<!--2. Countdown html--> -<span id= "Minute" >00</span> min the<span id= "Second" >00</span> sec -</p> -</body> -<!--3. Countdown js--> +<script type= "Text/javascript" > - varminute = "29"; + varSecond = 59; ASetInterval (function() { atsecond--; - if(second = = XX && minute = = 00) { -minute = 29; -Second = 59; -};//when the minutes and seconds are 00 o'clock, the value is re-given - if(Second = = 00) { inSecond = 59; -minute--; to if(Minute <) minute = "0" +minute; +};//when the second is 00 o'clock, the number of seconds is given back to the value - if(Second <) Second = "0" +second; the$ ("#minute"). text (minute); *$ ("#second"). Text (second); $}, 1000);Panax Notoginseng</script> - theView CodeJs_ a simple 30-minute cycle countdown