Javascript判断一个数字是否在一个区间内

<script>
//参数str判断的字符串 m最小值 n最大值
function check(str,m,n){
        var re = /(\d+)/g;
        while(re.exec(str))
        {
                var int = parseInt(RegExp.$1);
                if(int <m || int> n)return false;
        }
        return true;
}

</script>


<input name="t1" type="text"  id="t1" οnblur="Check(this)">