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>

  • 相关阅读:
    如何修改SVN中的用户名和密码
    Telerik_2012_Q3 RadGrid 汉化
    DXperience-12.1.5 官网下载+注册破解+帮助文档
    Telerik_2012_Q3 (已破解)全套下载链接
    WinForm 控件库
    向项目的文件夹中写入数据流
    coolcarousel 图片轮播缩放问题
    IOS开发UI篇--使用CAShapeLayer实现复杂的View的遮罩效果
    iOS开发
    解析 iOS 动画原理与实现
  • 原文地址:https://www.cnblogs.com/y0umer/p/3839538.html
Copyright © 2011-2022 走看看