<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
<title>学生作业提交页面</title>
<style type="text/css">
.txt{
border: none;
outline: none;
font-size: 16px;
display: block;
width: 100%;
resize: none;
line-height: 2;
background: inherit;
}
</style>
<template>
<textarea @input="handleChange" class="txt" rows="1"></textarea>
</template>
<script>
function handleChange(e) {
const textarea=e.target();
textarea.style.height=textarea.scrollHeight+'px';
}
</script>
</head>
<body>
<textarea class="txt" placeholder="回复内容"></textarea>
</body>
</html>