function()
{
   alert('呵呵')
}
<input type="button" value="提交" onclick="Go()"/>我要让用户按下Ctrl+Enter时,执行button的onclick事件,也就是相当于用户直接点按扭

解决方案 »

  1.   


    function Go()
    {
       alert('呵呵')
    }
    掉了个Go
      

  2.   

    不过IE下,这样是可以的
    function Go()
    {
       alert('呵呵');
    }document.onkeyup=function(){
        if (event.ctrlKey && event.keyCode==13)Go();
    }
      

  3.   

    试了下,Firefox 下这样就可以了,不过这个代码在IE下不能通过
    function Go()
    {
       alert('呵呵');
    }document.onkeyup=function(event){
        if (event.ctrlKey && event.keyCode==13)Go();
    }
      

  4.   

    window.onkeyup = function(event){if(event.ctrlKey&&event.KeyCode==13){alert("go")}}