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>
  • 相关阅读:
    Web 日志分析过程
    nginx系列之九:lua服务
    Linux网络编程之IO模型
    从URL输入到页面展现到底发生什么
    CentOS 日常运维十大技能
    以MySQL为例,详解数据库索引原理(1)
    Elasticsearch的特点以及应用场景
    Ubuntu1804编译安装LNMP
    golang 高级
    Centos7 安装 Redis
  • 原文地址:https://www.cnblogs.com/cjshuang/p/5273325.html
Copyright © 2011-2022 走看看