如何在 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.