价格正则

if(!/^[0-9]+.[0-9]{0,2}$/.test(txtprice.value))
        {
            alert("价格必须是数字,如有小数,保持两位!");
            txtprice.focus();
            return false;               
        }
posted @ 2010-08-20 17:38  94cool  阅读(190)  评论(0编辑  收藏  举报