开发者

input length = value length & expands automatically according to value length

I want开发者_如何转开发 value length to be the same length as input field and expand automatically. When i write in some text it always has right or left free space. I don't want to define input size, i just want it to be the size of the text.

Can this be done ?


You have to use javascript for doing this. Using pure HTML this can't be done. On change event of the text field, you can find the length of the text and the width/size and resize accordingly. Here is sample code.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜