테스트 사이트 - 개발 중인 베타 버전입니다

라디오 버튼에 따라 테이블 줄이 안 맞습니다 채택완료

qwqweqwe 4년 전 조회 2,430

 

</p>

<p>    <div class="tbl_frm01 tbl_wrap" style="margin:0 auto; text-align:left; border:1px solid #ccc;" >

        <table>

        <tbody></p>

<p>  <input type="checkbox" name="agree" value="1" id="agree">

   <label for="agree"> 개인정보 이용 내용에 동의합니다.</label>

  </p>

<p>   <strong class="sound_only">필수</strong></label></th>

   <td class="bod" style="font-size:13px;">

           개인정보보호법 제15조에 근거하여 코로나19 감염증 확산 방지를 위해 아래와 같은 민감정보를 수집/이용하는 것에 동의합니다.(필수)

   </td>

   </table>

 </div>

    <div class="tbl_frm01 tbl_wrap">

        <table>

        <tbody>

  <th scope="row" class="bod"><label for="mb_id">학번</th>

   <td scope="row" class="bod">

    <input type="text" name="bk_id" id="bk_id" value="<?php echo $member['mb_id'];?>" required class="frm_input required" size="20" maxlength="100">

   </td>

   <tr>

   <th><label for="wr_14">이름</th>

   <td>

    <input type="text" name="bk_name" id="bk_name" value="<?php echo $member['mb_name'];?>" required class="frm_input required" size="20" maxlength="100">

   </td>

  </tr> 

   <tr>

   <th><label for="wr_10">연락처</th>

   <td>

    <input type="text" name="wr_10" id="wr_10" value="<?=$wr_10?>" required class="frm_input required" size="20" maxlength="11"> 하이픈(-) 없이 숫자만 입력해주세요

   </td>

  </tr> 

        <tr>

            <th><label for="wr_1">*방문일<strong class="sound_only">필수</strong></label></th>

   <td>

     <input type="text" name="wr_1" value="<?=$wr_1?>" id="wr_1" required class="frm_input required" size="12" maxlength="8">

     <label for="wr_1" style="display:none">종료일<strong class="sound_only">필수</strong></label></td>

   </tr></p>

<p>        </tbody>

        </table></p>

<p>        <table>

        <tbody>

<!--  <tr>

            <th scope="row"><label for="wr_12">*주소(자택)<strong class="sound_only">필수</strong></label></th>

            <td><input type="text" name="wr_12" value="<?php echo $write[wr_12] ?>" id="wr_12" required class="frm_input required" size="80" maxlength="20"></td>

        </tr>

-->

  <tr>

            <th><label for="wr_name">*증상 유무
(해당사항
모두선택)<strong class="sound_only">필수</strong></label></th></p>

<p>     <td>

     <input type="radio" name="wr_2" value="증상없음" id="wr_2" onClick="toggleT1('0')" <? if($wr_2 == "증상없음") echo "checked";?> required>증상없음

     </td>

     <td>

      <input type="radio" name="wr_2" value="증상있음" id="wr_2" onClick="toggleT1('1')" <? if($wr_2 == "증상있음") echo "checked";?> required>증상있음

     </td>

   <td id='item_explan1' style='display: <?if($wr_2 == "증상있음") echo "block"; else echo "none";?>;'>

  <?php

   $check1 = explode(",", $write['wr_3']);

  ?>

   <input type="checkbox" name="check1[]" value="발열감"<?php echo in_array("발열감", $check1) ? ' checked="checked"' : '' ?>> 발열감

   <input type="checkbox" name="check1[]" value="기침"<?php echo in_array("기침", $check1) ? ' checked="checked"' : '' ?>> 기침

   <input type="checkbox" name="check1[]" value="오한"<?php echo in_array("오한", $check1) ? ' checked="checked"' : '' ?>> 오한

   <input type="checkbox" name="check1[]" value="근육통"<?php echo in_array("근육통", $check1) ? ' checked="checked"' : '' ?>> 근육통

   <input type="checkbox" name="check1[]" value="두통"<?php echo in_array("두통", $check1) ? ' checked="checked"' : '' ?>> 두통

   



   <input type="checkbox" name="check1[]" value="인후통"<?php echo in_array("인후통", $check1) ? ' checked="checked"' : '' ?>> 인후통

   <input type="checkbox" name="check1[]" value="후각미각소실"<?php echo in_array("후각미각소실", $check1) ? ' checked="checked"' : '' ?>> 후각미각소실

   <input type="checkbox" name="check1[]" value="호흡곤란"<?php echo in_array("호흡곤란", $check1) ? ' checked="checked"' : '' ?>> 호흡곤란

   </td>

  </tr></p>

<p>   <tr>

            <th scope="row"><label for="wr_name">*자가격리<strong class="sound_only">필수</strong></label></th>

     <td>

     <input type="radio" name="wr_4" value="아니오" id="wr_4" onClick="toggleT2('0')" <? if($wr_4 == "아니오") echo "checked";?> required>아니오

     </td>

     <td>

      <input type="radio" name="wr_4" value="예" id="wr_4" onClick="toggleT2('1')" <? if($wr_4 == "예") echo "checked";?> required>예

      </td>

     <td id="item_explan2" style='display: <?if($wr_4 == '예') echo "block"; else echo "none";?>;' >

     해제일 :

     <input id="wr_5" type="text" name="wr_5" value="<?=$wr_5?>" readonly required class="frm_input required" size="12" maxlength="8">

     </td>

     <label for="wr_5" style="display:none">종료일<strong class="sound_only">필수</strong></label></td></p>

<p>   </tr></p>

<p>   <tr>

            <th scope="row"><label for="wr_name">*최근 2주내
해외 방문력<strong class="sound_only">필수</strong></label></th>

     <td>

     <input type="radio" name="wr_6" value="아니오" onClick="toggleT3('0')" <? if($wr_6 == "아니오") echo "checked";?> required>아니오

     </td>

     <td>

      <input type="radio" name="wr_6" value="예" id="wr_6" onClick="toggleT3('1')" <? if($wr_6 == "예") echo "checked";?> required>예

     </td>

     <td id='item_explan3' style='display: <?if($wr_6 == '예') echo "block"; else echo "none";?>;'>

     국가 : <input type="text" name="wr_7" value="<?=$wr_7?>" id="wr_7" class="frm_input required" size="12" maxlength="8">

     입국일 : <input type="text" name="wr_8" value="<?=$wr_8?>" readonly id="wr_8" required class="frm_input required" size="12" maxlength="8">

     <label for="wr_8" style="display:none">종료일<strong class="sound_only">필수</strong></label></td>

   </tr></p>

<p>        </tbody>

        </table></p>

<p>    </div></p>

<p>

    <div class="btn_confirm">

        <input type="submit" value="작성완료" id="btn_submit" accesskey="s" class="btn_submit">

        <a href="./board.php?bo_table=<?php echo $bo_table ?>" class="btn_cancel">취소</a>

    </div>

    </form></p>

<p>

 

위 사진의 소스이고 각 항목을 클릭할 때 td 항목이 보이도록 만들었는데 항목을 클릭할 때마다

 

항목 클릭하는 위치도 변경되고 줄도 안 맞고 이상하네요..

 

숨겨져있다가 나올 때 깔끔하게 나올 수 있는 방법 있을까요?

댓글을 작성하려면 로그인이 필요합니다.

답변 1개

채택된 답변
+20 포인트
e
4년 전

해제일 다음에 아래 부분 삭제하고

<label for="wr_5" style="display:none">종료일<strong class="sound_only">필수</strong></label></td>

아래와 같은 방법으로 수정해보세요.

<td><div id="item_explan2" style='display: <?if($wr_4 == '예') echo "block"; else echo "none";?>;' >

     해제일 :

     <input id="wr_5" type="text" name="wr_5" value="<?=$wr_5?>" readonly required class="frm_input required" size="12" maxlength="8">

     </div></td>

그리고, 밑줄이 보이는건 css 문제인것 같네요.

로그인 후 평가할 수 있습니다

답변에 대한 댓글 1개

q
qwqweqwe
4년 전
감사합니다 해결되었습니다~

댓글을 작성하려면 로그인이 필요합니다.

답변을 작성하려면 로그인이 필요합니다.

로그인