如何在 HTML 中顯示文字區域的可見寬度?


在 HTML 中使用 cols 屬性顯示文字區域的可見寬度。你可以嘗試執行以下程式碼來實現cols屬性 -

示例

<!DOCTYPE html>
<html>
   <body>
      <textarea rows="3" cols="40">
         This is a demo paragraph. This is a demo paragraph.
         This is a demo paragraph. This is a demo paragraph.
      </textarea>
   </body>
</html>

更新於: 2020 年 3 月 3 日

151 次檢視

開啟你的 職業生涯

透過完成教程獲得認證

開始
廣告