이메일 폼에서 선택하면 input 박스에 자동으로 들어가게 하는 스크립을 어떻게 적용해야 하나요?
초보라..잘 않되네요~ㅜㅜ
<div class="kboard-attr-row kboard-attr-title">
<label class="attr-name">이메일 주소*</label>
<div class="attr-value"><input type="text" name="kboard_option_email01" id="email01" style="width: 100px;" value="<?php echo $content->option->email01?>" title="이메일 아이디"> @ <input type="text" name="kboard_option_email02" id="email02" style="width: 100px;" value="<?php echo $content->option->email03?$content->option->email03:$content->option->email02?>" title="도메인" />
<select name="kboard_option_email03" class="email-domain" title="도메인">
<option value="직접입력"<?php if($content->option->email03 == '직접입력'):?> selected="selected"<?php endif?>>직접입력</option>
<option value="naver.com"<?php if($content->option->email03 == 'naver.com'):?> selected="selected"<?php endif?>>naver.com</option>
<option value="daum.net"<?php if($content->option->email03 == 'daum.net'):?> selected="selected"<?php endif?>>daum.net</option>
<option value="hanmail.net"<?php if($content->option->email03 == 'hanmail.net'):?> selected="selected"<?php endif?>>hanmail.net</option>
<option value="gmail.com"<?php if($content->option->email03 == 'gmail.com'):?> selected="selected"<?php endif?>>gmail.com</option>
<option value="nate.com"<?php if($content->option->email03 == 'nate.com'):?> selected="selected"<?php endif?>>nate.com</option>
< /select>
</div>
부탁합니다.
<select name="kboard_option_email03" class="email-domain" title="도메인">
위 html 코드를 아래 코드로 교체 해보시겠어요?
<select name="kboard_option_email03" class="email-domain" title="도메인" onchange="jQuery('input[name=kboard_option_email02]').val(this.value)">