개발자공부/JavaJsp 썸네일형 리스트형 ajax 뒤로가기 제어하기 상단 전역변수 var oldURL = location.href;var oldHash = location.hash; 액션 1 . 리스트에서 레이어를 띄움 pop_open(글번호) 수행 function pop_open(movieNo){location.hash = "story/" + movieNo;} 액션 2 . location.hash 가 수행되면 아래 메서드 수행 $(window).on('hashchange', function (e) { var hash = location.hash; if( hash == "#_" || hash == "" ){ //팝업 닫기로 접근한 경우 액션 5 var regEx = /#([a-zA-z]+)\/([0-9]+)*/i; var match = oldHash.match(regEx.. 더보기 AJAX return find 방법, 에러 대응 var html = $(data).find("#eremList").html(); 간혹가다가 html이 다 안그려져서 ajax 리턴을 받는경우가 생겨서 var $data = $('').html(data); 더보기 JAVA paramMap 특수문자 검사 public boolean chkSpecStr(String str){ if(str.matches("[0-9|a-z|A-Z|ㄱ-ㅎ|ㅏ-ㅣ|가-힝]*")){ return true; }else{ return false; } } public String chkParamMap(Map paramMap){ Set set = paramMap.entrySet(); Iterator it = set.iterator(); while(it.hasNext()){ Map.Entry e = (Map.Entry)it.next(); System.out.println("키값= "+e.getKey()+ " value= "+e.getValue()); if(!e.getKey().equals("email")||!e.getKey().equals(.. 더보기 이전 1 다음