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" onkeyup="return isMaxLen(this)" />
checked maxLength
最新推荐文章于 2023-03-21 15:29:06 发布
1639

被折叠的 条评论
为什么被折叠?



