본문 바로가기
반응형

코딩 저장용8

[자바스크립트] 쿠키생성, 쿠키가져오기, 쿠키삭제 방법 /** * 쿠키 생성. setCookie('test', 'cookie test - 쿠키 테스트', 1) */function setCookie(cookieName, cookieValue, cookieDay){var expire = new Date();expire.setDate(expire.getDate() + cookieDay);cookies = cookieName + '=' + escape(cookieValue) + '; path=/ '; // 한글 깨짐을 막기위해 escape(cValue)를 합니다.if(typeof cookieDay != 'undefined')cookies += ';expires=' + expire.toGMTString() + ';';document.cookie = cookies;} .. 2018. 9. 4.
[자바(java)] map에 리스트담아서 오라클 업데이트 하는법 list에 값 담은다음 //맵 선언뒤HashMap map = new HashMap(); //맵에다 리스트를 담는다.map.put("list", list); 다음 SQL(오라클)에서 update table_name set //set부분에 foreach문을 써준다. ~~~~~~ where 1=1 성공~~!! 2018. 8. 31.
자바 int>String, String > int 형 변환하기 자바에서 int를 String으로, String을 int로 형 변환 시키는 일은 빈번한 일이지만,,,맨날 까먹는 나를위해서...남겨 놓는다.. String->int String str = Integer.parseInt(int); int->String int int = String.valueOf(str); 2018. 8. 31.
[JQUERY] 제이쿼리 금액 콤마찍기, 한글 처리할때 제이쿼리 3자리마다 comma설정할때... // 금액/숫자 입력부 키 이벤트 $inputNumber.keyup(function (event) { var str = event.currentTarget.value; if ($(this).data('price') === 'Y') { // 금액일경우 // 기존 콤마 해제 str = str.replace(/[^\d]+/g, ''); // 세자리마다 콤마 설정 $(this).val(str.replace(/(\d)(?=(?:\d{3})+(?!\d))/g, '$1,')); } else { $(this).val($(this).val().replace(/[^0-9]/g, '')); } }); // tab으로 커서 이동시 마지막에 한글이 남아 있을때 추가 처리 $inputN.. 2018. 8. 30.
반응형