如何在 HTML 中設定文字方向將被提交的文字方向?


使用 dirname 屬性允許您提交文字方向。該值將是輸入名稱後接 “.dir”

示例

<!DOCTYPE html>
<html>
   <body>
      <h2>Student Contact Form</h2>
      <form action = "mailto:emailid@example.com" method = "post" enctype = "text/plain">
         Student Name:<br><input type = "text" name = "sname" dirname = "sname.dir"> <br>
         Student Subject:<br><input type = "text" name = "ssubject"><br>
         <input type = "submit" value = "Send">
      </form>
   </body>
</html>

更新於: 03-Mar-2020

173 次瀏覽

開啟你的職業生涯

透過完成課程獲得認證

開始吧
廣告
© . All rights reserved.