jQuery Prevent Default Action Function Keys (F3, F4, etc.)

…衆ロ難τιáo~ 提交于 2019-12-01 13:19:49

This seems to work for F3 in IE8:

$(document).keydown(function(event) {
  event.preventDefault();

  if (event.keyCode == 114) { // F3
    // Remap F3 to some other key that the browser doesn't care about
    event.originalEvent.keyCode = 0;
  }
};

(based on http://www.fixya.com/support/t218276-disable_f3_function_key_from_intenet)

I don't believe you can hi-jack the user's browser.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!