我想創建一個禁用功能select
選項(授予類型),當我選擇一個選項窗體選擇字段應該禁用一些窗體字段。並通過選擇另一個選項,應禁用其他選項,並禁用先前的禁用選項。Jquery創建一個禁用功能
<form action="/execomp/addexeccomp" method="post" id="addDetailsForm">
< table align="center">
<tr>
<td>Grant Type</td>
<td><select name="granttype" id="grnt" />
<option value="ISO">Incentive Stock Option</option>
<option value="NSO">Non Qualified Stock Option</option>
<option value="SB">Stock Bonus </option>
<option value="ESOP">Employee Stock Ownership Plan</option>
<option value="RS">Restricted Stock</option>
<option value="RSU">Restricted Stock Unit</option>
<option value="ESPP">Employee Stock Purchase Plan</option>
</select>
</td>
</tr>
<tr id="iss">
<td>Issuer</td>
<td><input type="text" name="issuer" value="" id="iss"/></td>
</tr>
<tr id="date">
<td>Grant Date</td>
<td>
<input type="text" id="grantdate" name="grantdate" class="PopUpDate" style="display: inline;"/>
</td>
</tr>
<tr id="nou">
<td>Number of Units</td>
<td><input type="text" name="numberofunits" value="" /></td>
</tr>
<tr id="gp">
<td>Grant Price ($)</td>
<td><input type="text" name="price" value="" /></td>
</tr>
<tr id="fpu">
<td>FMV Per Unit ($)</td>
<td><input type="text" name="fmvperunitatgrant" value="" /></td>
</tr>
<tr id="vt">
<td>Vesting Type</td>
<td><select name="vestingtype" />
<option value="G">Graduated</option>
<option value="C">Cliff</option>
<option value="N">Neither</option>
</select>
</td>
</tr>
<tr id="vf">
<td>Vesting Frequency</td>
<td>
<select name="vestingfrequency" />
<option value="A">Annual</option>
<option value="Q">Quarterly</option>
<option value="M">Monthly</option>
</select>
</td>
</tr>
<tr id="vpp">
<td>Vesting % Per Period</td>
<td><input type="text" name="vestingfractionperperiod" value="" /></td>
</tr>
<tr id="vd">
<td>Vesting Duration</td>
<td><input type="text" name="vestingperiodyrs" value="" /> Years</td>
</tr>
<tr id="set">
<td>Settlement Option</td>
<td><select name="settlementoption" id="sett" />
<option value="C">Cash</option>
<option value="S">Stock</option>
<option value="N">Not Applicable</option>
</select></td>
</tr>
<tr id="ad">
<td>Annual Dividend</td>
<td><input type="text" name="annualcashdividendperunit" value="" />%</td>
</tr>
<tr id="dg">
<td>Dividend Growth</td>
<td><input type="text" name="dividendgrowth" value="" />%</td>
</tr>
<tr id="cp">
<td>Current Price</td>
<td><input type="text" name="curpriceperunit" value="" />%</td>
</tr>
<tr id="ar">
<td>Annual Return</td>
<td><input type="text" name="annualreturn" value="" />%</td>
</tr>
<tr id="ownr">
<td>Owner</td>
<td>
<select name="owner" />
<option value="client">Client</option>
<option value="spouse">Spouse</option>
<option value="trust">Trust</option>
</td>
</tr>
<tr id="bc">
<td>Brokerage Company</td>
<td><input type="text" name="brokeragecompany" value="" /></td>
</tr>
1)你嘗試過什麼?這只是HTML。 2)'align =「center」'已被棄用。 3)你正在自動關閉所有'select'元素。這是非法和畸形的。 – 2013-02-19 05:22:01
'''/'在@TimMedora建議的錯誤 – 2013-02-19 05:25:58