• 文本框格式问题(1)


    jsp 单选按钮、下拉列表、复选框、全选
    1、单选按钮
    ------------------------------------------------------------------------------------
    <tr>
    <td>选项名称</td>

    <td>

    <input type="radio" name="sex" value="1">1
    <input type="radio" name="sex" value="2">2
    <input type="radio" name="sex" value="3">3
    <input type="radio" name="sex" value="4">4
    ......
    </td>
    </tr>
    -------------------------------------------------------------------------------------
    2、下拉列表
    ---------------------------------------------------------------------------------------
    <tr>
    <td>学生年龄</td>
    <td>
    <select name="city" id="city">
    <option value = "1">1</option>
    <option value = "2">2</option>
    <option value = "3">3</option>
    <option value = "4">4</option>
    </select>
    </td>
    </tr>
    -----------------------------------------------------------------------------------
    3、复选框
    -----------------------------------------------------------------------------------
    <tr>
    <td>爱好</td>
    <td>
    <!-- 全选 -->
    <script type="text/javascript">
    function selectAll()
    {
    var s=document.getElementsByName("like");
    for (var i= 0; i <s.length; i++)
    {
    s[i].checked=document.getElementsByName("all");
    }
    }
    </script<!--复选框-->
    <input type="checkbox" name="all" value="全选" οnclick="selectAll()">全选
    <input type="checkbox" name="like" value="看书" id="1">看书
    <input type="checkbox" name="like" value="打球" id="2">打球
    <input type="checkbox" name="like" value="游戏" id="3">打游戏
    <input type="checkbox" name="like" value="游泳" id="4">游泳
    </td>
    </tr>
    -----------------------------------------------------------------------------------

  • 相关阅读:
    jade反编译,把html编译成jade
    runtime环境下的jade
    jade过滤器
    jade-render-renderFile
    【[USACO17DEC]Standing Out from the Herd】
    bzoj 1396: 识别子串
    bzoj 4327:JSOI2012 玄武密码
    hihocoder 后缀自动机四·重复旋律6
    hihocoder 后缀自动机四·重复旋律7
    【[CTSC2012]熟悉的文章】
  • 原文地址:https://www.cnblogs.com/lx06/p/14164528.html
Copyright © 2020-2023  润新知