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}}  
Related Article

E-Commerce Solutions

Leverage the same tools powering the Alibaba Ecosystem

Learn more >

Apsara Conference 2019

The Rise of Data Intelligence, September 25th - 27th, Hangzhou, China

Learn more >

Alibaba Cloud Free Trial

Learn and experience the power of Alibaba Cloud with a free trial worth $300-1200 USD

Learn more >

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.