每次我提交textarea時,它都會自動在textarea框的頂部添加行間距。如何以及在何處添加僅使用返回鍵輸入新行的編碼?如何使用PHP添加和刪除行距?
<div class="header">
<form enctype="multipart/form-data" action="mycomments.php" method="POST">
<textarea input type="text" name="Comments" style="height:100%;width:100%"
cols="100%" rows="10" ><?php include 'comments.php';?></textarea>
<br>
<input type="submit" value="Submit">
</form>
</div>
你看過'comments.php'中的內容嗎?只是因爲這個特定的代碼片段沒有額外的換行符,並不意味着你所包含的文件也不會... –