ポップアップにチェックボックスリストがあります。jqueryでselectallチェックボックスリスト項目関数を使用しました。問題は、selectall チェックボックスをチェックすると、ポップアップと Web ページのすべてのチェックボックスリスト項目が選択されることです。ポップアップでのみチェックボックスリストの項目のみを選択する方法..私のコードとして
<td> <div style="text-align: left; margin: auto;">
<asp:CheckBox ID="chkSelectReportAll" runat="server" Text="Select All" onclick="checkall()"/>
<asp:CheckBoxList ID="chkReportLst" runat="server">
</asp:CheckBoxList>
</div>
</td>
私のスクリプトとして
function checkall() {
$('#MainContent_uscOptionsPOPUP_chkSelectReportAll').click(
function () {
if (document.getElementById('chkReportLst'))
$("INPUT[type='checkbox']").attr('checked', $('#MainContent_uscOptionsPOPUP_chkSelectReportAll').is(':checked'));
});
}
助言がありますか ??