전화번호 정규화

it/JavaScript 2014. 8. 19. 10:51 Posted by 하얀나다

function checktel() {


var tel = document.frm.tel.value;

var str = /(010|011|016|019)-\d{3,4}-\d{4}/;

var result = str.test(tel);


if (!result) {

alert("전화번호 형식이 잘못되었다.");

email.focus();

email.select();

}

}

'it > JavaScript' 카테고리의 다른 글

up and down  (0) 2014.08.19
여행  (0) 2014.08.19
formTest 외부Script  (0) 2014.08.19
함수로 읽어와 값 설정  (0) 2014.08.19
자바스크립트 이메일 정규화  (0) 2014.08.19