2012-01-22 2 views

답변

1

양식의 .keypress() 이벤트에 가입하고 입력 인 경우 취소 할 수 .... 나에게 어떤 해결책을 알려주세요 :

$(function() { 
    // subscribe to the keypress event of the form 
    $('form').keypress(function(e) { 
     if (e.which == 13) { 
      // if Enter was pressed cancel the default action and 
      // prevent the form from submitting 
      return false; 
     } 
    }); 
}); 
+0

이 아주 좋은 스크립트입니다 ... 감사합니다 대단히 ..... –

+0

@ LakhbirChandel,이 게시물이 당신이 당신이 [대답으로 표시]했는지 확인하는 데 도움이된다면 (http://meta.stackexchange.com/questions/5234/how-does- 수락 - 답변 - 작업) 옆에있는 체크 표시를 클릭하십시오. –

관련 문제