本文介绍了什么是浏览器的刷新按钮的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.....
推荐答案
这篇关于什么是浏览器的刷新按钮的ASCII值的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!