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

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

posted @ 2010-05-22 11:26  cxc414  阅读(7822)  评论(0编辑  收藏  举报