만들어주신 분이 여행을 떠났어요,,,
본문
때문에 나는 qa배낭여행중입니다. 유유
아래 코드가 이상하게 기본적으로 한국에 체크되게 해야 하는건데..표시한 것에 체크되어 있어요,,유유
<label for="wr_179" > <input type="radio" name="wr_179" id="korea" checked="checked" value="KOREA" <? if ($write['wr_179'] == 'KOREA') echo "checked"?> onclick="div_sh(1);"> 한국</label>
<label><input type="radio" name="wr_179" id="other" onclick="div_sh(2);" value="other" <? if ($write['wr_179'] != 'KOREA') echo "checked"?>> <img src="../skin/board/order/img/world32.png" width="32" height="32" alt=""/>한국이외의 국가에서 수취 </label>
<? if($write['wr_179'] == 'KOREA' ) $hide ="none;"; else $hide="block;"; ?>
<div id="d1" style="display:<?=$hide?>">
<input type=text name='nation3' id='nation3' itemname='기타 국가' class="css-checkbox box" value='<?=$write['nation3']?>' size='35' maxlength='50' placeholder="수취 국가명을 영문으로 기재" required> </div>
</td>
답변 2
<label for="wr_179" >한국</label>
<input type="radio" name="wr_179" id="korea" value="KOREA" <?php echo ($write['wr_179'] == 'KOREA')?"checked='checked'":"";?> onclick="div_sh(1);">
<label for='other'>한국이외의 국가에서 수취</label>
<input type="radio" name="wr_179" id="other" onclick="div_sh(2);" value="other" <?php echo ($write['wr_179'] != 'KOREA')?"checked='checked'":"";?>>
<img src="../skin/board/order/img/world32.png" width="32" height="32" alt=""/>
<?php ($write['wr_179'] == 'KOREA' )?$hide ="none;":$hide="block;";?>
<div id="d1" style="display:<?=$hide?>">
<input type=text name='nation3' id='nation3' itemname='기타 국가' class="css-checkbox box" value='<?=$write['nation3']?>' size='35' maxlength='50' placeholder="수취 국가명을 영문으로 기재" required> </div>
</td>
이런식으로 써보세요