js 正则判断字符串是否为字母或数字

js 正则判断字符串是否为字母或数字

function checknum(value) {
            var Regx = /^[A-Za-z0-9]*$/;
            if (Regx.test(value)) {
                return true;
            }
            else {
                return false;
            }
        }

posted on 2011-06-13 21:05  shosky  阅读(23142)  评论(0编辑  收藏  举报

导航