채택완료

onclick="javascript:document.getElementById 추가하는 경우 질문

2017-06-21 (수) 10:51:00 2,221

<input type="button" value="초기화" class="btn_submit" onclick="javascript:document.getElementById('stx').value='';">

name="sfl" 의  sfl  값도 지우려면 위 소스를 어떻게 수정해 주어야 하나요? 

<select name="sfl" id="sfl">
        <option value="wr_subject"<?php echo get_selected($sfl, 'wr_subject', true); ?>>제목</option>
        <option value="wr_content"<?php echo get_selected($sfl, 'wr_content'); ?>>내용</option>

|

답변 2개 / 댓글 2개

채택된 답변
+20 포인트

javascript:$('#stx,#sfl').val('') 

답변에 대한 댓글 1개

감사드립니다. 잘해결되었습니다.
즐거운 점심시간 되세요.

onclick="document.getElementById('stx').value=''; document.getElementById('sfl').value='';"

답변에 대한 댓글 1개

감사드립니다.
즐거운 점심시간되세요.

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