回车响应按钮的onclick事件
...
<body onload= "if(event.keyCode==13) {setTimeout( "aa() ",1);} ">
....我想在按回车时,能响应下面按钮的onclick事件。。。
......
<input type= "button " value=aaa onclick= "if(event.keyCode==13) {
function aa()
{
window.location.href= "/product/admin/productadmin/deleteclass.php ";
}
setTimeout( "aa() ",1); ">
.......
</body>
高手指教呀。。。
------解决方案-------------------- <body onload= "if(event.keyCode==13){document.getElementById( 'btn ').click;} ">
....我想在按回车时,能响应下面按钮的onclick事件。。。
......
<input id= "btn " type= "button " value=aaa onclick= "if(event.keyCode==13) {
function aa()
{
window.location.href= "/product/admin/productadmin/deleteclass.php ";
}
setTimeout( "aa() ",1); ">
.......
</body>