zoukankan      html  css  js  c++  java
  • 使下拉框某项不可选的方法

    2008年02月22日 02:24 P.M.

    <html>
       <head>
        <style type="text/css">
        option.disabled { color: #999;}
        </style>


        <script>
         function preventSelectDisabled(oSelect)
         {    var isOptionDisabled = oSelect.options[oSelect.selectedIndex].disabled;   
        if(isOptionDisabled)
        {      
        oSelect.selectedIndex = oSelect.defaultSelectedIndex;       
        return false;   
        }  
        else oSelect.defaultSelectedIndex = oSelect.selectedIndex;    return true;
          }

        </script>


       </head>
       <body>
       <select name="Type" id="ReportName" class="textinput"
            onchange='return preventSelectDisabled(this)'>
            <option value="reportAsset">
              Positions Summary
            </option>

            <option value="reportOptions">
              Account Transactions
            </option>
            <option value="reportOptions">
              Performance Summary
            </option>

            <option disabled='disabled' class='disabled'>

              Asset Allocations
            </option>
           
            <option disabled='disabled' class='disabled'>
              Options Tracking
            </option>

            <option disabled='disabled' class='disabled'>
              Historical Variance
            </option>

            <option disabled='disabled' class='disabled'>
              Portfolio Statistics
            </option>
          </select>
          </body>

  • 相关阅读:
    Codeforces Round #271 (Div. 2) F. Ant colony 线段树
    poj 1744 tree 树分治
    HDU Shell Necklace CDQ分治+FFT
    BZOJ 1567: [JSOI2008]Blue Mary的战役地图 矩阵二维hash
    BZOJ 1042: [HAOI2008]硬币购物 容斥+背包
    HDU 6078 Wavel Sequence 树状数组优化DP
    Gym
    HDU 6058 Kanade's sum 二分,链表
    HDU 6061 RXD and functions NTT
    ZOJ 3233 Lucky Number 容斥原理
  • 原文地址:https://www.cnblogs.com/y0umer/p/3839538.html
Copyright © 2011-2022 走看看