什么是浏览器的刷新按钮的ASCII值 [英] What is ASCII value for Refresh button of Browser

查看:93
本文介绍了什么是浏览器的刷新按钮的ASCII值的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,我希望刷新"按钮具有Ascii值.我认为刷新按钮和F5功能相同.但是这里的问题是,我页面中的一个Linkbutton,当单击Linkbutton时打开新窗口.这是单击刷新按钮或F5时,它将再次打开同一窗口.

我写了停止F5的代码:

Hi guys, I want Ascii value for Refresh button. I think Refresh button and F5 function are same . But problem here is , one Linkbutton in my page , when click on the Linkbutton open the new window. Here is when click on the refresh button or F5 , it will open the same window again.

I wrote the code for stoping F5 :

document.attachEvent("onkeydown", my_onkeydown_handler);
window.history.forward(1);
document.attachEvent("onkeydown", my_onkeydown_handler);


function my_onkeydown_handler() {
 switch (event.keyCode) {

      case 116: // 'F5'
          event.returnValue = false;
          event.keyCode = 0;
         // window.status = "We have disabled F5";
          window.event.cancelBubble = true;
          break;
      }
  }



F5 ascii是116,
是否有用于停止浏览器刷新按钮的解决方案.

能否请任何人帮我.....



F5 ascii is 116,
is there solution for stoping refresh button of browser .

could you please any one help me.....

推荐答案

否,您必须使用window.open()函数打开弹出窗口...在此功能中,您可以指定许多选项,以便不显示浏览器的工具栏,从而解决您的问题.使用您的JavaScript代码禁用了F5键...因此,通过这两种方式,您都限制了最终用户刷新页面...有关windwo.open()的更多信息,请检查给定的链接
http://www.w3schools.com/jsref/met_win_open.asp [
No for that you have to open pop-up window using window.open() function...In this function you can specify many option so not display toolbar of browser so its solve your problem..& disabled F5 key using your javascript code...So by both these way you restrict end user to refresh your page...For more information of windwo.open() check given link
http://www.w3schools.com/jsref/met_win_open.asp[^]


刷新按钮"没有ASCII值或键码-未被键盘激活,而是单击鼠标.

您不能在所有浏览器中可靠地禁用F5,并且甚至不能在任何浏览器中可靠地禁用AFAIK!您根本无法在所有浏览器中使用刷新按钮.
The "refresh button" does not have an ASCII value, or a keycode - it is not activated by the keyboard, it is a mouse click.

You cannot disable F5 reliably in all browsers, and AFAIK it can''t even be disabled reliably in any browser! The refresh button you have no access to at all in all browsers.


这篇关于什么是浏览器的刷新按钮的ASCII值的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆