From fe8efeb2045d7ccd32a6a3b9625e7e08ecbc5bed Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=90=B4=E9=95=BF=E5=BE=81?= Date: Wed, 29 Mar 2023 09:30:03 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=A2=9Ejs=E5=B7=A5=E5=85=B7=E8=84=9A?= =?UTF-8?q?=E6=9C=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- JS/Tools.js | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 JS/Tools.js diff --git a/JS/Tools.js b/JS/Tools.js new file mode 100644 index 0000000..32f1030 --- /dev/null +++ b/JS/Tools.js @@ -0,0 +1,2 @@ +//textarea根据内容文字自动调整高度。注册textarea.oninput事件执行以下函数。 +function textareaAutoHeight(){this.style.height='auto'; this.style.height= this.scrollHeight;} \ No newline at end of file