<input type="text" id="test" onfocus="textSub(this,12);" />
下面是js代码:
function textSub(obj, count) {
        obj.maxlength = count;
       }但是,没有效果。