日期:2014-05-16 浏览次数:20423 次
<SCRIPT ID=clientEventHandlersJS LANGUAGE=javascript>
function _saveInfo()
{
?? //可以写你需要的事件
???? alert("你键盘输入了回车!");
}
function document_onkeypress()
{
???? switch (event.keyCode)
???? {
???????? case 13:???????? _saveInfo();//捕捉回车符
???? }???????
}
</SCRIPT>
<SCRIPT LANGUAGE=javascript FOR=document EVENT=onkeypress>
document_onkeypress()
</SCRIPT>
?
?