Blogger Information
Blog 8
fans 1
comment 0
visits 10142
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
按钮,下拉列表,文本域和表单域分组的常用属性
雷斯提亚
Original
1178 people have browsed it

1. 按钮常用属性

  1. <button
  2. type="submit"
  3. formaction=".."
  4. formmethod="POST/GET"
  5. formtarget="..">按钮名字
  6. </button>
  7. //type="submit" 为按钮默认值;
  8. //formaction="" 用来链接不同脚本,从而发挥不同的作用;
  9. //formmethod="POST/GET" 动态设置提交类型,有POST和GET两种类型
  10. //formtarget=".." 表示打开方式,其中有"_blank"和"_self"最为普遍("_blank":在新窗口打开;"_self":在该窗口打开)

2. 下拉列表常用属性

  1. <select
  2. name=".."
  3. id=".."
  4. size="8"
  5. multiple
  6. onchange=".."
  7. onclick="..">
  8. //multiple:允许下拉框进行多选; onchange="..": 该属性在元素被改变时触发; //onclick="..": 该元素被点击时被触发;
  9. <optgroup value="前端"> //optgroup:不可被选中,可以为下拉列表分开,从而形成不同类型而进行选择
  10. <option value="HTML5">HTML5</option>
  11. <option value="CSS3" selected>CSS3</option> //selected:默认被选中
  12. <option value="javascript" disabied>JavaScript</option> //disabled:不可被选中
  13. </optgroup>
  14. <optgrounp value="后端"> //label:可省略选项文本,并将option转化为单标签
  15. <option value="php" label="PHP"></option>
  16. <option value="mysql" label="MySQL"></option>
  17. <option value="laravel" label="laravel"></option>
  18. </optgrounp>
  19. </select>

3. 文本域常用属性

  1. <textarea
  2. name="reply"
  3. id=""
  4. cols=".." //规定文本区域的可见宽度
  5. rows=".." //规定文本区域的可见宽度
  6. minlength=".." //规定文本框的最小长度
  7. maxlength=".." //规定文本框的最大长度
  8. form="common" //与`form`表单绑定
  9. placeholder="不超过50字符"
  10. onchange=".."
  11. onselect=".."
  12. >
Correcting teacher:天蓬老师天蓬老师

Correction status:unqualified

Teacher's comments:没有作业总结
Statement of this Website
The copyright of this blog article belongs to the blogger. Please specify the address when reprinting! If there is any infringement or violation of the law, please contact admin@php.cn Report processing!
All comments Speak rationally on civilized internet, please comply with News Comment Service Agreement
0 comments
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!