zoukankan      html  css  js  c++  java
  • html 表单初步学习

    <html>
    
    <head>
    <title> 静态页面</title>
    </head>
    
    <body>
    
    这是一个静态页面<br>
    
    <!-- target: _blank -- 在新窗口中打开链接 
    _parent -- 在父窗体中打开链接 
    _self -- 在当前窗体打开链接,此为默认值 
    _top -- 在当前窗体打开链接,并替换当前的整个窗体(框架页) -->
    
    <a href = "https://www.baidu.com" target = "_blank">这是一个链接</a>
    
    <br>
    <h1>表单</h1>
    
    <!--action:表单要提交的目的地址 method:表单中数据的提交方式-->
    <form action = "action.html" method = "GET">
    <!--文本框-->
    姓名:<input type = "text" name = "name"> <br>
    <!--单选框,对于一组元素,要保证他们的name属性相同-->
    性别:<input type = "radio" name = "sex" value = "male"><input type = "radio" name = "sex" value = "female"><br>
    
    学院:
    <select name = "school">
    <option value = "ht">航天学院</option>
    <option value = "rw">软件与微电子学院</option>
    </select>
    <br>
    
    <!--复选框,对于一组元素,要保证他们的name属性相同-->
    爱好:
    <input type = "checkbox" name = "hobby" value = "swimming">游泳
    <input type = "checkbox" name = "hobby" value = "run">跑步
    <input type = "checkbox" name = "hobby" value = "football">足球
    
    <br>
    密码:<input type = "password" name = "pswd"> <br>
    
    
    <input type = "submit" value = "提交">
    <input type = "reset" value = "重置">
    <!--空格-->

    &nbsp
    </form> 

    <!--表格:tr 元素定义表格行,th 元素定义表头,td 元素定义表格单元-->
    <table border="1">
    <tr>
    <th>Month</th>
    <th>Savings</th>
    </tr>
    <tr>
    <td>January</td>
    <td>$100</td>
    </tr>
    </table>


    </body>

    </html>
  • 相关阅读:
    [转载]为 Windows 下的 PHP 安装 PEAR 和 PHPUnit
    作品和案例
    js创建对象的最佳实践
    log4j的PatternLayout参数含义
    Java线程池——ThreadPoolExecutor的使用
    登录mysql 报 Access denied for user 'root'@'localhost' 错误
    CentOS 7下使用yum安装MySQL5.7
    linux下MySQL停止和重启
    Linux 命令 -- chown
    Linux 命令 -- chmod
  • 原文地址:https://www.cnblogs.com/cjshuang/p/5273325.html
Copyright © 2011-2022 走看看