我没找到F5在ASCII的位置。
只好
关注
或者可以判断他的来出
如果不是你所想的就(报错)

解决方案 »

  1.   

    F5的ASCII值为116,但我不知道如何禁止刷新:<html>
    <body onkeydown="return abc();">
    <script language="JavaScript">
    <!--
    var i=0;
    function abc(){
    a.innerText = i;
    i++;
    if (event.keyCode == 116){
    event.returnValue=false;
    return false;
    }
    }
    //-->
    </script>
    <div id="a"></div>
    </body>
    </html>
      

  2.   

      <script language=javascript>
    <!--
    ie4 = (document.all) ? true : false;
    ns4 = (document.layers) ? true : false;
    function keyDown(e)
    {
    if (ns4)
    {var nKey=e.which;
    if (nKey==17) {
    //document.write("请勿试图拷贝网页内容");
    window.alert("^_^");
    }
    if (ieKey==116) {
    //document.write("对不起,本网页无法刷新");
    window.alert("^_^");
    }
    }
    if (ie4){var ieKey=event.keyCode;
    if (ieKey==17) {
    //document.write("请勿试图拷贝网页内容");
    window.alert("^_^");
    }
    if (ieKey==116) {
    //document.write("对不起,本网页无法刷新");
    window.alert("^_^");
    }
    }
    }
    document.onkeydown=keyDown;
    if (ns4) document.captureEvents(Event.KEYDOWN);
    //-->
    </script>
      <script language=javascript>
    function click() { if (event.button!=1) {
    document.write("^_^");
    //window.alert("^_^");
    }}
    document.onmousedown=click
    </script>
      

  3.   

    http://www.chinawolf.com/~bihu/wdb/wdbread.php?forumid=6&filename=f_19
      

  4.   

    <body onkeydown="if (event.keyCode == 116){ return false;}"> ??
    还是不行