1

optgroup の一部のアイテムを無効にするにはどうすればよいですか

「--ピックアップ--」と「--すべての場所--」を無効にしたい

<select name="ddlpickuplocation" id="ddlpickuplocation" tabindex="1" class="width320">
<optgroup label="california">
<option value="--Pick Up--">--Pick Up--</option>
<option value="LOS ANGELES AIRPORT  (LAX)">LOS ANGELES AIRPORT  (LAX)</option>
<option value="SAN DIEGO AIRPORT  (SAN)">SAN DIEGO AIRPORT  (SAN)</option>
<option value="SAN FRANCISCO AIRPORT  (SFO)">SAN FRANCISCO AIRPORT  (SFO)</option>
<option value="--All locations--">--All locations--</option>
<option value="ANAHEIM DOWNTOWN">ANAHEIM DOWNTOWN</option>
<option value="BATON ROUGE INTERNATIONAL AIRPORT">BATON ROUGE INTERNATIONAL AIRPORT</option>
<option value="BERKELEY DOWNTOWN">BERKELEY DOWNTOWN</option>
<option value="SAN JOSE AIRPORT">SAN JOSE AIRPORT</option>
<option value="SANTA BARBARA AIRPORT">SANTA BARBARA AIRPORT</option>
</optgroup>
<optgroup label="florida">
<option value="BOCA RATON AIRPORT">BOCA RATON AIRPORT</option>
<option value="CLEARWATER AIRPORT">CLEARWATER AIRPORT</option>
<option value="DAYTONA AIRPORT">DAYTONA AIRPORT</option>

</optgroup>


</optgroup>
<optgroup label="rest of usa">
<option value="--Pick Up--">--Pick Up--</option>
<option value="CHICAGO OHARE AIRPORT  (ORD)">CHICAGO OHARE AIRPORT  (ORD)</option>
<option value="--All locations--">--All locations--</option>
<option value="AKRON AIRPORT">AKRON AIRPORT</option>
<option value="ALLENTOWN AIRPORT">ALLENTOWN AIRPORT</option>
<option value="ALLENTOWN DOWNTOWN">ALLENTOWN DOWNTOWN</option>
<option value="AMARILLO AIRPORT">AMARILLO AIRPORT</option>
<option value="ANCHORAGE AIRPORT">ANCHORAGE AIRPORT</option>
<option value="ANDERSON DOWNTOWN">ANDERSON DOWNTOWN</option>
<option value="APPLETON AIRPORT">APPLETON AIRPORT</option>
<option value="ARKANUS AIRPORT">ARKANUS AIRPORT</option>
<option value="ATLANTA AIRPORT">ATLANTA AIRPORT</option>
</optgroup>
<optgroup label="western usa">
<option value="ALBUQUERQUE AIRPORT">ALBUQUERQUE AIRPORT</option>
<option value="ASPEN AIRPORT">ASPEN AIRPORT</option>

</optgroup>

4

3 に答える 3

0

スタイルのためにオプションを無効にしたくない場合は、optgroup を再度使用してください。何かのようなもの

<select>
   <optgroup label="rest of usa">
        <optgroup label="--Pick Up--"></optgroup>
        <option value="CHICAGO OHARE AIRPORT  (ORD)">CHICAGO OHARE AIRPORT  (ORD)</option>
        <option value="--All locations--">--All locations--</option>
        <option value="AKRON AIRPORT">AKRON AIRPORT</option>
   </optgroup>
</select>
于 2013-04-26T12:32:34.750 に答える