1.直接在页面添加以下代码

    <script>
        window.onload = function () {
            $.each($("textarea"), function(i, n){
                $(n).css("height", n.scrollHeight + "px");
            })
        }
    </script>
posted on 2019-12-17 17:53  JioNote  阅读(75)  评论(0编辑  收藏  举报