it/JavaScript
전화번호 정규화
하얀나다
2014. 8. 19. 10:51
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();
}
}