JS screen key effect and change the key effect of the sample code

Source: Internet
Author: User

  This article is mainly on the JS screen button effect and change the key effect of the sample code is carried out, the need for friends can come to the reference, I hope to help you.

function keys f1-f2:112-123   a-b:65-90   number keys: 0-9:48-57   esc:27   BACKSPACE: 8   return:   Shift:16;ctrl:17;al t:18   Spaces:   insert:45;delete:46   Code is as follows: function Document.onkeydown () {        &NBSP ;      //Web page Press ENTER trigger   if (event.keycode==13)   {   document.getelementbyid ("loginbtn") . Click ();       return false;                                  &N BSP;}       document.onkeydown=mm_keypress;   function  mm_keypress (num) {   //Prevent system backspace  var keycode = Event.keycode;  if (keycode ==8)/ /screened back bar once  {    Event.keycode = 0  //event.returnvalue=false;   return;    if (keycode >=112 && keycode <=123)/shield f1-12 function key  {    Event.keycode = 0;   Event.returnvalue=false ;   return; &NBSP}}  

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.