<div class="codetitle"> <span><a style="CURSOR: pointer" data="10580" class="copybut" id="copybut10580" onclick="doCopy('code10580')"><u>複製程式碼</u></a></span> 程式碼如下:</div> <div class="codebody" id="code10580"> <br><tr> <br><th>是否對映:> <br> </th> </tr> <tr> <br><th>是否對應: > <br> </th> <td> <br><input type="radio" name="sfys" class="radio" id="yes">value="1"/><label for="yes">是</label> <br><input type="radio" name="sfys" class="radio" id="no">value="0"/><label for="no">否 <br></label> </td> </tr> <br><br> <div class="codetitle">用jquery方法操作,使其預設選項是否. <span><a style="CURSOR: pointer" data="2294" class="copybut" id="copybut2294" onclick="doCopy('code2294')"><u></u></a>複製程式碼</span> </div> <div class="codebody" id="code2294"> 程式碼如下:<br><br> <br>$(function () { <br>var sfys = " ${os.sfys}#if>"; <br>if (sfys == '1') { <br>$("#yes").attr('checked', 'checked'); <br>} else { <br>$("#no").attr('checked', 'checked'); <br>} </div>}); </div>