A JavaScript code about the browser

Source: Internet
Author: User
Functionhint () {window. status & quot; Transaction Processing in progress. Please wait .... & quot;} // addedbyposy2004-02-11 // block related page refresh, back and other operations. Functionprotect () {if (event. keyCode116) | // shield f5...

Function hint (){
Window. status = "the transaction is being processed. Please wait ....";
}
// Added by posy 2004-02-11
// Block operations such as page refresh and back.
Function protect (){

If (event. keyCode = 116) | // mask the F5 refresh key
(Event. ctrlKey & event. keyCode = 82) {// Ctrl + R
Warnning ();
Event. keyCode = 0;
Event. returnValue = false;
}
If (event. ctrlKey) & (event. keyCode = 78) {// block Ctrl + n
Warnning ();
Event. returnValue = false;
}

If (event. shiftKey) & (event. keyCode = 121) {// block shift + F10
Warnning ();
Event. returnValue = false;
}

If (window. event. altKey )&&
(Window. event. keyCode = 37) | // mask Alt + direction key seek
(Window. event. keyCode = 39) {// mask Alt + direction key →
Warnning ();
Event. returnValue = false;
}


If (event. ctrlKey) & (window. event. keyCode = 37) | (window. event. keyCode = 39 ))){
Warnning ();
Event. keyCode = 0;
Event. returnValue = false;
}
}

Function warnning (){
Alert ("this type of operation is prohibited for your online transaction security ");
}


/*
* Prevent right-click operations on the webpage
*
*/
Function Click (){
Warnning ();
Window. event. returnValue = false;

}

 

From Computer Language Technology Discussion Group

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.