请写一段Javascript的代码防止用户提交表单后刷新网页(例如按F或按IE上的刷新按钮)重新提交表单内容页面提交是在本页面提交到本页面大家帮帮忙?
下面的代码只是实现了屏蔽鼠标右键Ctrl+nshift+FF刷新退格键
function KeyDown(){
//屏蔽鼠标右键Ctrl+nshift+FF刷新退格键
//alert(ASCII代码是+eventkeyCode);
if ((windoweventaltKey)&&
((windoweventkeyCode==)|| //屏蔽 Alt+ 方向键 ←
(windoweventkeyCode==))){ //屏蔽 Alt+ 方向键 →
alert(不准你使用ALT+方向键前进或后退网页!);
eventreturnValue=false;
}
if ((eventkeyCode==) || //屏蔽退格删除键
(eventkeyCode==)|| //屏蔽 F 刷新键
(eventkeyCode==)|| //屏蔽 F 刷新键
(eventctrlKey && eventkeyCode==)){ //Ctrl + R
eventkeyCode=;
eventreturnValue=false;
}
if ((eventctrlKey)&&(eventkeyCode==)) //屏蔽 Ctrl+n
eventreturnValue=false;
if ((eventshiftKey)&&(eventkeyCode==)) //屏蔽 shift+F
eventreturnValue=false;
if (windoweventsrcElementtagName == A && windoweventshiftKey)
windoweventreturnValue = false; //屏蔽 shift 加鼠标左键新开一网页
if ((windoweventaltKey)&&(windoweventkeyCode==)){ //屏蔽Alt+F
windowshowModelessDialog(about:blankdialogWidth:px;dialogheight:px);
return false;}
}