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

    <!DOCTYPE html>
    <html>
      <head>
     <meta http-equiv="Content-Type" content="text/html;charset=utf-8"> <!-- 表示支持中文-->
        <title>my page</title>
      </head>
      <body>
        <header>中文</header>
     <form>
     <fieldset>
     <legend>我是标题</legend><!-- legend表示fieldset的标题-->
     姓名:<br> <!-- br表示换行-->
     <input type="text" name="yourName">
     <br>
     年龄:<br>
     <input type="text" name="yourAge"><!-- text表示单行文本框 不支持换行符-->
     </form>
     <form>
     <label for="femal">女</label><!-- id==for-->
     <input type="radio" name="sex" id="femal"/>
     <br />
     <label for="male">男</label>
     <input type="radio" name="sex" id="male"/>
     <br>
     <label for="email">邮箱</label>
     <input type="email" id="email" name="email" multiple><!-- 多个邮箱之间用,-->
        <br>
     <label for="pwd">密码</label>
     <input type="password" id="pwd" name="pwd">
     <br>
     <label for="serach">搜索</label>
     <input type="search" id="search" name="search">
     <br>
     <label for="tel">电话</label>
     <input type="tel" id="tel" name="tel">
     <br>
     <label for="tel">电话</label>
     <input type="url" id="url" name="url">
     <label for="myColor">What's your favorite color?</label>
        <input type="text" name="myColor" id="myColor" list="mySuggestion"> <!-- 选择框 list==datlist id-->
        <datalist id="mySuggestion">
            <option>black</option>
            <option>blue</option>
            <option>green</option>
            <option>red</option>
            <option>black</option>
            <option>yellow</option>
        </datalist>
     <!-- <input type="checkbox" checked>:复选框-->
     <!-- <input type="radio" checked>:单选框-->
     <br>
     <fieldset>
        <legend>What is your favorite color?</legend>
        <ul><!-- ul定义无序列表 -->
            <li><!-- li定义列表项目可以与ol ul使用 -->
                <label for="red">red</label>
                <input type="radio" checked id="red" name="color" value="red"> <!-- checked表示默认值, 个颜色的name值一致-->
            </li>
            <li>
                <label for="yellow">yellow</label>
                <input type="radio" id="yellow" name="color" value="yellow">
            </li>
            <li>
                <label for="blue">blue</label>
                <input type="radio" id="blue" name="color" value="blue">
            </li>
        </ul>
     <input type="reset" value="This is a reset button">
     <button type="button">
        This a anonymous button
     </button>
     </fieldset>
     <button type="submit">
        This a submit button
     </button>
    <!--or-->
     <input type="submit" value="This is a submit button">
     <button type="reset">
        This a reset button
     </button>
    <!--or-->
     <input type="reset" value="This is a reset button">
     <button type="button">
        This a anonymous button
     </button>
    <!--or-->
     <input type="button" value="This is a anonymous button">
     </form>
      </body>
    </html>
  • 相关阅读:
    【看完想不会都难的系列教程】- (3) JQuery+JQueryUI+Jsplumb 实现拖拽模块,流程图风格
    数据库~大叔通过脚本生成poco实体
    Git~分支真的很轻
    jenkins~管道Pipeline里使用公用类库
    docker~run起来之后执行多条命令
    jenkins~管道Pipeline的使用,再见jenkinsUI
    通过数组初始化链表的两种方法:指向指针的引用node *&tail和指向指针的指针(二维指针)node **tail
    NYOJ 16 矩形嵌套(动态规划)
    SPOJ 416
    sqlserver,执行生成脚本时“引发类型为“System.OutOfMemoryException”的异常”(已解决)
  • 原文地址:https://www.cnblogs.com/emma-zhu/p/11811939.html
Copyright © 2011-2022 走看看