function isMaxLen(o){ var nMaxLen=o.getAttribute? parseInt(o.getAttribute("maxlength")):""; if(o.getAttribute && o.value.length>nMaxLen){ o.value=o.value.substring(0,nMaxLen) } } <input type="text" οnkeyup="return isMaxLen(this)" />
checked maxLength
最新推荐文章于 2024-04-02 08:32:52 发布