οninput="if(value.length > 5)value = value.slice(0, 5)" 转载于:https://my.oschina.net/guozhouyuan/blog/3064021