4
我想禁用或覆蓋瀏覽器的默認幫助功能。如何禁用瀏覽器的默認幫助功能
我試着在網上看幾個例子,但他們不適合我。 (下面的代碼正在FF和鉻,但不是歌劇&即)
<html>
<title>
</title>
<body>
<script src = "jquery-1.7.1.min.js" text="type="text/javascript""></script>
<script language="javascript" type="text/javascript">
document.onkeydown = function(event)
{
if(window.event && window.event.keyCode == 112)
{
event.stopPropagation();
event.preventDefault();
event.keyCode = 0;
return false;
//document.onhelp = new Function("return false;");
//window.onhelp = new Function("return false;");
//helpFunction();
}
else if(event.which == 112)
{
helpFunction();
}
};
var false_function = new function(){"return false";};
shortcut.add("f1",false_function);
var helpFunction = function() {
alert('help');
}
</script>
<h2>Test</h2>
</body>
如何將此添加到我的瀏覽器? – erjoalgo