메시지 관련 스크립트 - 유용한 스크립트 6 /* * 메세지를 출력후에 이전 페이지로 되돌린다. */ function alert_back(msg) { alert(msg); history.back(); } /* * 메세지를 출력후에 특정 페이지로 이동한다. */ function alert_location(msg, url) { alert(msg); location.href = url; } /* * 메세지를 출력후에 특정 객체를 Focus 한다. */ function alert_focus(msg, obj) { alert(msg); if(obj) obj.focus(); } 더보기 날짜 관련 스크립트 - 유용한 스크립트 5 /* * 입력한 날짜(yyyyMMdd)가 유효한 날짜인지 검사 */ function is_valid_date(date_str) { var yyyyMMdd = String(date_str); var year = yyyyMMdd.substring(0,4); var month = yyyyMMdd.substring(4,6); var day = yyyyMMdd.substring(6,8); if (!is_number(date_str) || date_str.length!=8) return false; if (Number(month)>12 || Number(month) 8) time2 = to_date2(date2).getTime() - y1970; else time2 = to_date(date2).getTime() .. 더보기 쿠키 제어 -유용한 스크립트 4 /* * 주어진 이름으로 된 쿠키 값을 반환 */ function get_cookie(name) { var cookies = document.cookie.split("; "); for (var i=0; i 더보기 이전 1 ··· 3 4 5 6 7 8 9 ··· 12 다음