Post
KO

javascript 정규식 숫자만 입력

function onlyNumber(obj) { if(/[^0123456789]/g.test(obj.value)) {   alert(“숫자가 아닙니다.\n\n0-9의 정수만 허용합니다.”);   obj.value = “”;   obj.focus();  } }

This article is licensed under CC BY 4.0 by the author.