Programming/Etc
악의 축 IE
Bandcy
2014. 7. 22. 16:18
IE에서는 enter key를 입력하는 것을 통해 submit 처리가 됩니다. 왜 이러는 걸까요?...
The reason why?
IE에서는 text field에서 enter 키를 입력하는 것을 form submit을 원하는 것으로 가정합니다.
이러한 문제를 해결하기 위해서는 크게 두 가지 방법이 있습니다.
#01 mark button is not for submit
Button이 submit용이 아니라는 attribute를 추가합니다.
Ex, <button type=”button” … >
단 이 경우는 view에 있는 모든 button를 대상으로 적용해야 합니다.
#02 prevent enter key event
Input control에서 enter keypress event를 prevent합니다.
Reference