javascript - Make input extend automatically?
天蓬老师
天蓬老师 2017-06-12 09:23:09
0
2
651

Assume that when the text is less than one line at the beginning, it will be an input-sized field
But when it jumps to the second line, the input height will also change automatically?
Just like when writing a title in WordPress, if the text exceeds the input range, will it automatically extend downwards?

Screen Shot 2017-06-10 at 11.42.08 PM.png

Screen Shot 2017-06-10 at 11.42.21 PM.png

天蓬老师
天蓬老师

欢迎选择我的课程,让我们一起见证您的进步~~

reply all(2)
phpcn_u1582

In this case, textarea is usually used, but if you have to use input, you have to use js to calculate the height, and then set the height of the input. It seems a bit troublesome to calculate

左手右手慢动作

Then use textarea

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template