방법 1 : 방법 1
코드 사본은 다음과 같습니다.
<script type = "text/javaScript"event = "onkeydown"for = "document">
if (event.keyCode == 13)
{
var button = document.all ( "< %= buttonAddorUpdate.clientId %>");
button.focus ();
button.click ();
}
</스크립트>
방법 2 : 방법 2.
코드 사본은 다음과 같습니다.
<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 ();
}
</스크립트>
<cript>
기능 noclick ()
{
거짓을 반환합니다.
}
</스크립트>
참고 : 사용자가 컨트롤을 볼 수 없도록하십시오
1 : 속성을 숨 깁니다
2 : 인터페이스 외부에 넣습니다
메소드 3 :
블록 페이지 캐리지 리턴 이벤트
다음 내용을 양식 ID에 추가하십시오.
코드 사본은 다음과 같습니다.
method = "post"onkeydown = "if (event.keyCode == 13) false를 반환;"