私が書き込むときにテキストエリアを自動拡張する方法はありますか?私たちが書いているとおりにテキストエリアを自動展開する方法
これは私のコードです:
<script type="text/javascript">
function clearContents(element) {
element.value = '';
}
function updateContents(element) {
element.value = "What's on your mind?";
}
</script>
<h1>New status</h1>
<form action="index.php" method="post" name="new_message">
<textarea id="message" onFocus="clearContents(this);" onKeyPress="catchEnter(this);">What's on your mind?</textarea>
<input type="button" value="Post">
</form>
これにはJQueryが必要です。 – LocustHorde