$(function(){ //말줄임표 //$('.eps').ellipsis({ lines: 2 }); //$('.eps3').ellipsis({ lines: 3 }); //리스트팝업창 페이지네이션 /*$(".pagi").each(function(){ $(this).click(function(evt){ evt.preventDefault(); $(this).addClass("active").siblings().removeClass("active"); }) })*/ //휴대폰 숫자만 받기 $("input:text[numberOnly]").on("keyup", function() { $(this).val($(this).val().replace(/[^0-9]/g,"")); }); }); //라디오 체크유무 확인 function checkRadio(href){ var howCnfm = $("input[name=how_cnfm]:radio:checked").val(); if(howCnfm){ location.replace(href); }else{ alert("인증방법을 선택하세요."); } } //숫자 글자수 제한 function maxLengthCheck(object){ if(object.value.length > object.maxLength){ object.value = object.value.slice(0, object.maxLength); } } //윈도우 팝업 function getCenterLeft(nWidth) { var nAvail = getMaxWidth() - nWidth; if (nAvail <= 0) return 0; return parseInt(Number(nAvail / 2)); } function getCenterTop(nHeight) { var nAvail = getMaxHeight() - nHeight; if (nAvail <= 0) return 0; return parseInt(Number(nAvail / 2)); } function getMaxWidth() { return screen.availWidth; } function getMaxHeight() { return screen.availHeight - 55; } function openPopUpWindow(strURL, strName, nWidth, nHeight, nScrollbars, option) { var strMsg = "can't open popup window"; var strFeatures = ""; var nTop = getCenterTop(nHeight); var nLeft = getCenterLeft(nWidth); var nToolbar = 0; var nDirectory = 0; var nFullscreen = 0; var nLocation = 0; var nMenubar = 0; var nResizable = 1; var nScrollbars = nScrollbars; var nStatus = 0; var nTitlebar = 1; strFeatures = "top=" + (option && option.top ? option.top : nTop); strFeatures += ",left=" + (option && option.left ? option.left : nLeft); strFeatures += ",width=" + (option && option.width ? option.width : nWidth); strFeatures += ",height=" + (option && option.height ? option.height : nHeight); strFeatures += ",toolbar=" + (option && option.toolbar ? option.toolbar : nToolbar); strFeatures += ",directory=" + (option && option.directory ? option.directory : nDirectory); strFeatures += ",fullscreen=" + (option && option.fullscreen ? option.fullscreen : nFullscreen); strFeatures += ",location=" + (option && option.location ? option.location : nLocation); strFeatures += ",menubar=" + (option && option.menubar ? option.menubar : nMenubar); strFeatures += ",resizable=" + (option && option.resizable ? option.resizable : nResizable); strFeatures += ",scrollbars =" + (option && option.scrollbars != null ? option.scrollbars : nScrollbars); strFeatures += ",status=" + (option && option.status ? option.status : nStatus); strFeatures += ",titlebar=" + (option && option.titlebar ? option.titlebar : nTitlebar); try { var popWnd = window.open(strURL, strName, strFeatures); if (popWnd == null) { alert(strMsg); return null; } popWnd.focus(); return popWnd; } catch (e) { alert(e.message); return null; } } function verifyPassword(obj){ if (/(\w)\1\1/.test(obj.value)) { alert("같은 문자를 3번이상 사용할수 없습니다."); obj.focus(); return false; } var regExp = /(?=.*\d{1,20})(?=.*[~`!@#$%\^&*()-+=]{1,20})(?=.*[a-zA-Z]{1,20}).{8,20}/; if(regExp.test(obj.value) == false) { alert('비밀번호는 영문+숫자+특수기호 조합 8~20자리 이내로 입력해주세요.'); obj.value = ''; obj.focus(); return false; } return true; }