更新时间:2023-09-06 19:08:40
这只能通过javascript设置size =占位符长度来完成:
This can be done only via javascript by setting the size = placeholder length:
input.setAttribute('size',input.getAttribute('placeholder').length);
这里是所有输入的代码:
http://jsfiddle.net/KU5kN/
Here is a code that dose that for all the inputs: http://jsfiddle.net/KU5kN/