方法一:
<script type="text/javascript" event="onkeydown" for="document">
if(event.keyCode==13)
{
var button=document.all("<%=ButtonAddorUpdate.ClientID %>");
button.focus();
button.click();
}
</script>
方法二:
<input type="button" onclick="noClick()" style="margin-top:-1024px;" id="noUseButton" />
<script type="text/javascript" event="onkeydown" for="document">
if(event.keyCode==13)
{
var button=document.getElementById("noUseButton");
button.focus();
button.onclick();
}
</script>
<script>
function noClick()
{
return false;
}
</script>
方法三:
method="post" onkeydown="if(event.keyCode==13) return false;"