html基础标签-2-textarea文本域

textarea文本域

 1 <!doctype html>
 2 <html lang='zh-cn'>
 3 <head>
 4     <meta charset='utf-8'>
 5     <meta name='author' content='宋英杰'>
 6     <meta name='keywords' content=''>
 7     <meta name='description' content=''>
 8     <title>textarea</title>
 9     <style type='text/css'>
10     *eee{margin:0;padding:0;}
11     html{font-size:100px;}
12     body{font:0.14rem/1.5 Microsoft Yahei,Arial,'宋体','黑体';background:#FFF;}
13     </style>
14 </head>
15 <body>
16     <textarea readonly name="txtarea1" style="800px;height:400px;">
17 注释:在文本输入区内的文本行间,用 "%OD%OA" (回车/换行)进行分隔。
18 <html>
19     <head>
20     </head>
21     <body>
22     效果测试专用;
23     不要用tab,集成上文的效果,神烦;
24     属性:
25     disabled:不能操作此文本域;
26     readonly:字面;
27     autofocus:自动获取文本域为焦点
28     wrap:换行方式
29       soft显示效果自动换行;提交数据不自动换行;(默认)
30       hard全自动换行
31       off:
32       physical=hard
33       virtual=soft
34     form:指定想关联的form元素的id
35     placeholder:占位符,无内容时显示
36     required;表示此项目为必须输入项目(必填内容)。
37     样式:固定高宽:1,resize:none;2,max-apx;,max-height:apx;;resize级别高于max
38     </body>
39 </html>
40     </textarea>
41     <form>
42         <textarea autofocus required name="txtarea2" placeholder="请输入账号" style="300px;height:200px;resize:none;max-300px;max-height:200px;"></textarea>
43     </form>
44 </body>
45 </html>
原文地址:https://www.cnblogs.com/tamato-jacob-wealllostcontrol/p/5416259.html