zoukankan      html  css  js  c++  java
  • CSS 表单

    1.表单的工作原理:

     2.表单的写法:

    3.表单的常用代码及表现形式:

    <body>
    
    <form action="http://www.miaov.com/" method="get" target="_blank">
    提交按钮:<input type="submit" value="提交OK" name="" />
    <br/><br/>
    文本框:<input type="text" name="" />
    <br/><br/>
    密码框:<input type="password" name="" />
    <br/><br/>
    
    单选按钮:
    <input type="radio" name="gender" id="a" /><label for="a"></label>
    
    <input type="radio" name="gender" id="b" /><label for="b"></label>
    <br/><br/>
    
    <!-- 
    checked  默认选中
    disabled 禁用
     -->
    复选框:
    <input type="checkbox" name="" disabled /><input type="checkbox" name="" disabled /><input type="checkbox" name="" />逛街
    <input type="checkbox" name="" />健身
    <input type="checkbox" name="" />直排
    <input type="checkbox" name="" checked/>旅游
    <input type="checkbox" name="" />美食
    
    <br/><br/>
    <hr/>
    上传:<input type="file" name="" />
    <br/><br/>
    图片:<input src="sun.jpg" type="image" name="" />
    <br/><br/>
    按钮:<input  type="button" name="" />
    <br/><br/>
    重置:<input  type="reset" name="" />
    <br/><br/>
    隐藏:<input  type="hidden" name="" />
    <br/><br/>
    <hr/>
    下拉选框:
    <select>
        <option>1999</option>
      <option>1998</option>
      <option selected>1997</option><!-- 默认选中 -->
      <option>1996</option>
      <option>1995</option>
    </select>
    <br/><br/>
    文本域:<textarea name="comments" rows="10" cols="48"></textarea>
    <!-- H5新元素 -->
    <input type="number" min="0" max="20"/><!-- 限制只输入数字 -->
    <input type="range" min="0" max="20" step="5"/><!-- 类似number的滑动条,step是步长 -->
    <input type="color" /><!-- 颜色选择器 -->
    <input type="date" /><!-- 日期选择控件 -->
    <input type="email" /><!-- 文本输入,但是在移动浏览器上会得到输入email的定制键盘 -->
    <input type="tel" /><!-- 类似于email,弹出定制键盘 -->
    <input type="url" /><!-- 如上 -->
    </form>
    View Code

     

    4.表单css重置:

    form{margin:0;}
    input{margin:0;padding:0;}
    select{margin:0;}
    textarea{margin:0; padding:0;resize:none; overflow:auto; outline:none;}

    5.name的工作方式:

    6.get和post的区别:

    努力但不功利~~!
  • 相关阅读:
    嘿嘿...World Cup 2006!
    打开指定的access数据库
    微软的好东东:Slideshow Generator Powertoy for Windows XP
    大地诗景:银川 (转载)
    软件加密技术及实现(转载)
    惠威D1080带来精致听音感受
    编辑word中文本框的内容
    管理之困:居高不下的流动率
    【转】力控的60个经典问题
    解决联想部分电脑不能用GHOST备份问题
  • 原文地址:https://www.cnblogs.com/langlang149/p/5591294.html
Copyright © 2011-2022 走看看