zoukankan      html  css  js  c++  java
  • 表单标签

    表单是用于向服务端通信的ui页面,

      *标签<from></form>,表明表单的内容范围

      *表单里可以有输入框:<input />

        *文本框:<input type="text" />

        *密码框:<input type="password" />

        *单选框:<input type="radio" />

        *复选框:<input type="checkbox" />

        *文件框:<input type="file" />

        *按钮:<input type="button" />

        *提交功能按钮:<input type="submit" />

        *重置功能按钮:<input type="reset" />

        *隐藏内容,此不显示,但是在提交时会传给服务端:<input type="hidden" />

        *图片按钮:用一个图片来代替提交功能按钮:<input type="image" src="图片地址" />

      *提交信息服务端总得接受理解是什么内容啊,则此时在表单的各个项中应该插入变量和值,此内容由字段,name和value实现

        *文本框:<input type="text" name="user" />当文本框中输入东西时,会把user=所输入的东西传到服务端,密码框同理

        *单选框:当只是上述那样,发现都可以选择,但是智能选一个,这是应该几个单选框定义一个相同的变量

          <input type="radio" name="sex" value="nan"/>nan<input type="radio" name="sex" value="nv"/>nv

        *复选框:<input type="language" value="chinese"/>chinese<input type="language" value="english"/>english

      *下拉框:

        <select name="stu">

          <option value="lisi">lisi</option>

        </select>

    一下实现一个简单的申请页面,代码如下:

    <html>
        <body>
            <form>
                <table border="1" bordercolor="black" cellspacing="0">
                    <tr>
                        <th colspan="2">login</th>
                    </tr>
                    <tr>
                        <td>user:</td>
                        <td><input type="text" name="user"/></td>
                    </tr>
                    <tr>
                        <td>password:</td>
                        <td><input type="password" name="psd"></td>
                    </tr>
                    <tr>
                        <td>single:</td>
                        <td>
                            <input type="radio" name="sex" value="boy">boy
                            <input type="radio" name="sex" value="girl">girl
                        </td>
                    </tr>
                    <tr>
                        <td>double</td>
                        <td>
                            <input type="checkbox" name="where" value="chian"/>china
                            <input type="checkbox" name="where" value="us"/>us
                            <input type="checkbox" name="where" value="jp"/>jp
                        </td>
                    </tr>
                    <tr>
                        <td>file</td>
                        <td>
                            <select name="code" width="80%">
                                <option value="null">----</option>
                                <option value="c">c</option>
                                <option value="c++">c++</option>
                                <option value="java">java</option>
                                <option value="php">php</option>
                            </select>
                        </td>
                    </tr>
                    <tr>
                        <th colspan="2">
                        <input type="submit"/>submit
                        <input type="reset"/>reset
                        </th>
                    </tr>
                </table>
    
            </form>
        </body>
    </html>
  • 相关阅读:
    UVA12125 March of the Penguins (最大流+拆点)
    UVA 1317 Concert Hall Scheduling(最小费用最大流)
    UVA10249 The Grand Dinner(最大流)
    UVA1349 Optimal Bus Route Design(KM最佳完美匹配)
    UVA1212 Duopoly(最大流最小割)
    UVA1395 Slim Span(kruskal)
    UVA1045 The Great Wall Game(二分图最佳匹配)
    UVA12168 Cat vs. Dog( 二分图最大独立集)
    hdu3488Tour(KM最佳完美匹配)
    UVA1345 Jamie's Contact Groups(最大流+二分)
  • 原文地址:https://www.cnblogs.com/fantasy01/p/4027867.html
Copyright © 2011-2022 走看看