在 HTML 中设置表单文本换行

htmlweb developmentfront end technology更新于 2025/8/18 0:44:17

使用 wrap 属性在 HTML 中设置文本换行。您可以尝试运行以下代码来实现 wrap 属性 −

示例

<!DOCTYPE html>
<html>
   <body>
      <form action = "">

         <textarea rows = "2" cols = "12" name = "details" wrap = "hard">
         This is demo text This is demo text This is demo text This is demo text</textarea><br>

         <input type = "submit">
      </form>
   </body>
</html>

相关文章


有用资源