This article illustrates the way that JavaScript realizes the countdown effect of work. Share to everyone for your reference. Specifically as follows:
Weekend, get a countdown to work, entertainment.
Make sure that the following three points:
1, non IE browser, higher chrome version, has opened HTML5 desktop notice. See screenshot below for specific settings
2, put this HTML on the local Web server test, directly double-click to run can not pop-up desktop alerts
Incidentally, this program can easily be extended to regular notifications.
The process of doing this thing is two points more tangled, summed up:
1, parseint ("09") returns 0. The correct approach is parseint ("09", 10), explicitly specifying the cardinality as decimal
2, False and "false", this is also a little bit tangled, started me like this
$ ("#minute"). attr ("ReadOnly", "false");
But it doesn't work, because the ReadOnly property is actually only two values true or false, so if I set its value to "false", it is equivalent to setting (the Non-null string to Boolean type is true):
$ ("#minute"). attr ("ReadOnly", true);
Update:
Fixed some minor bugs, and realized that "it's not easy to look very simple".
The effect is as shown in the following illustration:
<! DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 transitional//en" "Http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd ">
The
wants this article to help you with your JavaScript programming.