본문 바로가기

Solution26

[etc] Cannot read property 'field' of undefined error Uncaught TypeError: Cannot read property 'field' of undefined위와 같은 에러가 뜨며 부트스트랩에 문제가 있다고함 부트스트랩 문제는 아니고.. 위와같이 table에thead의 th갯수와tbody의 tr갯수가 맞지 않아 생기는 현상. 위아래 태그 갯수를 맞춰주면 해결됨 if you got this error, tags count and tags count doesn't match.check your tags count. it should be same. 2017. 8. 8.
[JavaScript] $ Is not defined 에러 문제)디버깅 중 $ is not defined 에러 발생 이유)JQuery가 정상적으로 road되지 못하여 발생 해결방안)소스에 추가. Error)When you debugging, '$ is not defined' error comes up, Reason)the reason is JQuery cannot loaded normally. Solution)insert in source. 2017. 7. 24.
[JQuery] replace 콤마 제거 replace comma 금액필드에 , 제거 해야할 경우 amount.replace(",", "");-> only replace one comma-> 앞에 한개만 제거 amount.replace(/,/g, '');-> replace all comma-> 모든 콤마 제거-> 정규식 How to replace all of comma Result)amount = "1,000,000" amount.replace(",", "");1000,000 amount.replace(/,/g, '');1000000 2017. 7. 21.
[JavaScript] event.keyCode가 firefox에서 작동하지 않을 때 ㅂㄷㅂㄷ.... 크로스 브라우징의 늪...(웹표준인가...) event.keyCode 익스에선 되는데 파폭에서 안되는 경우 회원가입 폼 사용시, 로그인 시, 게시판 형식의 검색 or 로그인 코딩할 때 자주 쓰는 event.keyCode Before) if(event.keyCode==13){//엔터 입력시 실행 함수fnLogin();} 키값을 인식하는 코드인데 파이어폭스에서 또 안먹음^^호출시 함수 파라미터로 event객체를 넘겨야만 한다고 함. After) //key가 눌렸을 경우document.onkeypress = function(e){ //key 초기화var result = ""; if(typeof(e) != "undefined") result = e.which; else result = event.. 2017. 1. 5.