$(‘.selector‘).attr("checked", true);
<s:iterator value="jobSelect" id="jobLink2"> <s:iterator value="jobLink2" id="job2"> var arr = $(‘.selector‘); var a = ${job2.id}; $(‘.selector‘).each(function(){ if($(this).val()== ${job2.id}){ $(this).attr("checked", true); } }); </s:iterator> </s:iterator>
时间: 2024-12-21 12:41:33