首页 > 其他分享 >textarea自动适应高度

textarea自动适应高度

时间:2023-01-27 21:01:31浏览次数:32  
标签:Java textarea chrome 高度 适应 自动

textarea自动适应高度,兼容IE/Firefox、chrome

代码:

<textarea name="textarea" id="textarea" style='overflow-y: hidden;height:20px' onpropertychange="this.style.height = this.scrollHeight + 'px';" oninput="this.style.height = this.scrollHeight + 'px';">
</textarea>

更多内容及Java+大数据个人原创视频,可关注公众号观看:

textarea自动适应高度_chrome


原创文章,转载请注明出处!!



标签:Java,textarea,chrome,高度,适应,自动
From: https://blog.51cto.com/dreamboy/6024326

相关文章