JQuery 取消选中 div 中的所有复选框

2024-01-24

<div id="termSheetPopup">
    <div style="text-align:center;">
        <select id="termSheetType">
            <option>Internal</option>
            <option>Borrower Facing</option>
        </select>
    </div>

    <input type="checkbox" name="SummaryInformation">Summary Information<br />
    <input type="checkbox" name="ProductLegs">Product Legs<br />
    <input type="checkbox" name="AmortizationOptions">Amortization Options<br />
    <input type="checkbox" name="Values">Values<br />
    <input type="checkbox" name="Rates">Rates<br />
    <input type="checkbox" name="RatesSpecific">Rates (All-In-Rate, PV01)<br />
    <input type="checkbox" name="AmortizationSchedule">Amortization Schedule<br />
    <input type="checkbox" name="SponsorInfo">Sponsor/Affiliate Info<br />
    <input type="checkbox" name="BorrowerInfo">Borrower Info<br />
    <input type="checkbox" name="SponsorContacts">Sponsor/Affiliate Contacts<br />
    <input type="checkbox" name="CashFlows">Cash Flows<br />
    <input type="checkbox" name="PrePayment">Pre-Payment<br />
    <input type="checkbox" name="FutureExposure">Potential Future Exposure<br />
    <input type="checkbox" name="FutureExposureSpecific">Potential Future Exposure (Max Number and Date Only)<br />
    <input type="checkbox" name="History">History<br />
</div>

什么是 JQuery 来删除该 div 下面的所有复选框?


要取消选中所有复选框(如标题所示):

$('#termSheetPopup').find('input[type=checkbox]:checked').removeAttr('checked');

要删除所有复选框(如问题所示):

$('#termSheetPopup').find('input[type=checkbox]:checked').remove();
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)

JQuery 取消选中 div 中的所有复选框 的相关文章

随机推荐