zoukankan      html  css  js  c++  java
  • 文本框格式问题(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>
    -----------------------------------------------------------------------------------

  • 相关阅读:
    安卓权威编程指南-笔记(第24章 Looper Handler 和 HandlerThread)
    AndroidImageSlider
    ToolBar的使用
    安卓权威编程指南-笔记(第26章 服务的作用)
    关于两个update语句互相死锁的显现,加深我们对锁的了解 转载
    js 原型和构造方法 转载
    关于distinct 和group by的去重逻辑浅析
    tab 下一个
    当前浏览器版本
    清除li间隔
  • 原文地址:https://www.cnblogs.com/lx06/p/14164528.html
Copyright © 2011-2022 走看看