html表单应用

<!DOCTYPE html>
<html>
  <head>
    <meta name="generator"
    content="HTML Tidy for HTML5 (experimental) for Windows https://github.com/w3c/tidy-html5/tree/c63cc39" />
    <meta charset="utf-8" />
    <title>表单</title>
  </head>
  <body>
    <h1>会员注册</h1>
    <!--action转到哪个页面-->
    <form action="https://www.baidu.com/" name="form1" target="_blank">
    <!--disabled不可用-->
    不可用 
    <input type="text" value="admin" disabled="disabled" />
    <br />只读: 
    <input type="text" value="admin" readonly="readonly" />
    <br />
    <!--  文本框和密码框:value是属性默认值-->
     姓名: 
    <input name="username" type="text" value="admin" size="20" />
    <br />密码: 
    <input name="password" type="pswd" value="123" size="20" />
    <br />
    <!--文件上传-->
     头像: 
    <input type="file" />
    <br />
    <input type="button" value="确定" />
    <br />
    <!--性别单选,name值相同-->
     
    <!--input 值"checked"是默认选择-->
     性别: 
    <input type="radio" name="sex" checked="checked" /><input type="radio" name="sex" /><br />语言: 
    <!--点击radio单选后面的文字也能选择的方法input id="id" ,label for=“id”-->
     
    <input type="radio" id="chinese" name="language" checked="checked" /> 
    <label for="chinese">汉语</label> 
    <input type="radio" id="english" name="language" /> 
    <label for="english">英语</label>
    <br />爱好:
    <br />
    <input type="checkbox" />篮球 
    <input type="checkbox" />足球 
    <input type="checkbox" />乒乓球 
    <input type="checkbox" />跳绳
    <br />    <br />    <br />选择您的学历:
    <!--select下的属性multiple是多选 option为disabled值时不能选-->
    <select name="education" multiple="mulpitle" >
    <optgroup label="学历">
      <option value="master">研究生</option>
      <!--默认为本科 option后面加上selected="selected"-->
      <option value="university" selected="selected">本科</option>
      <option value="institution">专科</option>
      <option value="high-scool" disabled="disabled">高中</option></optgroup>
    </select>
    <br />个人说明:
    <br />
    <!--cols是长度,rows是高度,也就是行数-->
     
    <textarea value="" cols="40" rows="5">   
    <!--双标签默认值写到两个标签之间-->...</textarea>
    <br />
    <input type="submit" value="确认提交" /> 
    <input type="reset" value="重置" />
    <br /></form>
  </body>
</html>

 

转载于:https://www.cnblogs.com/Yimi/p/5863169.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值