html中的form表单标签属性

from:表单

action:提交地址 ,动作 目标
method:提交方式(get ,post)

input:

value=“":默认值

  name=“":名称

  maxlength限制输入字符数

  disabled:禁用,不可操作

  readonly:只读
  required:必填项
  placeholder:提示文本
  autofocus:自动获得焦点
  autocomplet:自动记忆(on/off)
  textarea:多行文本框
   type="类型“

         (url,tel,email,date
           text:文本

           password:密码
           submit:提交按钮
           reset:重置
           button:普通按钮
           hidden:影藏字段
            range:活动条
            imge:图片提交按钮
            seacrch:搜索框
                file:文件选取
            radio:单选框(value=“")

            checkbox:复选框”)

下拉菜单:
<select size=”2“(显示项数目) multiple(多选)>
<option>选项1</option>
<option>选项2</option>
</select>

<html>
<head>
<title>表单</title>
<meta charset="utf-8">
<style type="text/css">
form{

    width:550px;
    height:550px;
    padding-top:10px;
    margin;5px;
    background: #bbffcc;
    font-size: 25px;
  }
  fieldset{
    width:500px;
    height:500px;
    background: #bbffcc;
    algin:center;
    padding-top:10px;
  }
  table{
    border: 1;
    width: 350px;
    height: 400px;
    border-color: red;
    padding-top:10px;
  }
  input{
    width: 250px;
    height: 30px;
    line-height:30px;
    padding-top:10px;
    
  }
 .text{
     width: 250px;
     height: 30px;

  }
  #input{
    width:20px;
    height:30px;
  }
 
</style>

</head>
<body>
<form >
<fieldset>
<legent text-algin="ccenter">修改个人信息</legent>

姓名:<input type="text" class="text" placeholder="姓名">


密码:<input type="password" class="text" placeholder="密码">


性别:<input type="radio" style="width:20px">男<input type="radio" style="width:20px">女


学历:<select name="name">
<option value="">初中</option>
<option value="">高中</option>
<option value="">专科</option>
<option value="">本科</option>
<option value="">硕士</option>
<option value="">博士</option>

             </select><br><br>
        意向工作城市:<input type="checkbox" id="input">贵阳<input type="checkbox" id="input">上海<input type="checkbox" id="input">深圳<input type="checkbox" id="input">北京 <br> 
        个人描述:<input type="text" style="height:100px"> <br><br>
               <input type="checkbox" id="check"  style="width:30px ;padding-left:70px">
                  <label for="check"> 不要公开我的信息</label> <br><br>
                <input style="width:40px" type="button" value="保存">  <input style="width:40px" type="submit" value="提交">
    </fieldset>

</form>

</body>
</html>

最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容