日期:2014-05-18  浏览次数:20374 次

怎么设置button控件的快捷键是ctrl+Z
若是accessKey= "Z "的话,快捷键是alt+z,所以大家帮帮忙

------解决方案--------------------
document.onkeydown = function() { if(event.ctrlKey && String.fromCharCode(event.keyCode) == "Z ") { document.getElementById( "button1 ").click(); } }
------解决方案--------------------
mark
------解决方案--------------------
<input type=submit accessKey= "Z " value=提交(Alt+Z)>
------解决方案--------------------
liuyun1987(流云拂碧)正解,试了下,ok!
------解决方案--------------------
document.onkeydown = function()
{
if(event.ctrlKey && String.fromCharCode(event.keyCode) == "Z ")
{
document.getElementById( "button1 ").click();
}
}
这个绝对OK的!!!