Automatic timed jump

Source: Internet
Author: User
1 < Script Language = " Javascript " Type = " Text/JavaScript " >
2 VaR Hongyiovertime = 58 ;
3 VaR Hongyistartdate = New Date ();
4 VaR Hongyiuplinedate = Hongyistartdate. setminutes (hongyistartdate. getminutes () + Hongyiovertime );
5 Document. onmousedown = Domousedown;
6 // Document. onmousemove = domousemove;
7 // Document. onmouseout = domouseout;
8 Document. onmouseup = Domouseup;
9 Document. onkeydown = Dokeydown;
10 Function Domousedown ()
11 {
12VaRCrrutdate= NewDate ();
13Hongyiuplinedate=Crrutdate. setminutes (crrutdate. getminutes ()+Hongyiovertime );
14}
15 Function Domousemove ()
16 {
17VaRCrrutdate= NewDate ();
18Hongyiuplinedate=Crrutdate. setminutes (crrutdate. getminutes ()+Hongyiovertime );
19}
20 Function Domouseout ()
21 {
22VaRCrrutdate= NewDate ();
23Hongyiuplinedate=Crrutdate. setminutes (crrutdate. getminutes ()+Hongyiovertime );
24}
25 Function Domouseup ()
26 {
27VaRCrrutdate= NewDate ();
28Hongyiuplinedate=Crrutdate. setminutes (crrutdate. getminutes ()+Hongyiovertime );
29}
30 Function Dokeydown ()
31 {
32VaRCrrutdate= NewDate ();
33Hongyiuplinedate=Crrutdate. setminutes (crrutdate. getminutes ()+Hongyiovertime );
34}
35 Function Hongyisetgologin ()
36 {
37 // VaR dateobj = new date ();
38 VaR Divobj = Document. getelementbyid ('div1 _ stratdate ');
39 VaR Cr1_date = New Date ();
40
41 If (Hongyiuplinedate. valueof () - Cr1_date. valueof ()) / 60000 ) <   0 )
42 {
43 Divobj. innertext = 'Current time :' + Cr1_date. tolocalestring () + '[' + (Hongyiuplinedate. valueof () - Cr1_date. valueof ()) / 1000 + '] The logon page will be displayed in seconds ';
44 Window. Location = 'Http: // 192.168.4.10/aqwebtest /'
45 }
46 Divobj. innertext = 'Current time :' + Cr1_date. tolocalestring () + '[' + (Hongyiuplinedate. valueof () - Cr1_date. valueof ()) / 1000 + '] The logon page will be displayed in seconds ';
47
48 }
49 Window. setinterval ('hongyisetgologin ()', 600 );
50 </ Script >

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.