IE11判断是否全是中文的时候无效写法

 <li>
                            <input type="search" id="userName" type="text" style=" 150px;" class="text" maxlength="11"
                                onkeyup="check(this)" /></li>
  function check(text) {
        while (/[a-zA-Z0-9]/.test(text.value)) {
            text.value = text.value.substring(0, text.value.length - 1);
        }
    }

Slowly I find myself
原文地址:https://www.cnblogs.com/SDdemon/p/14985237.html