$('#chargeEmail3').change(function(){

$('#chargeEmail3 option:selected').each(function() {

if($(this).val() == 'self'){

$('#chargeEmail2').val('');

$('#chargeEmail2').attr("disabled", false);

} else if ($(this).val == 'select'){

$('#chargeEmail2').val('');

$('#chargeEmail2').attr("disabled", false);

} else {

$('#chargeEmail2').val($(this).text());

$('#chargeEmail2').attr("disabled", true);

}

});

});



<tr>

<th scope="row"><label for="chargeEmail">담당자  이메일</label></th>

<td>

<div class="item">

<input type="text" id="chargeEmail" name="chargeEmail" class="in_text" style="width:100px;" value="" maxlength="20" title="이메일 아이디" /> @

<input type="text" id="chargeEmail2" name="chargeEmail2" class="in_text" style="width:100px;" value="" maxlength="20" title="이메일 아이디" />

<select name="chargeEmail3" id="chargeEmail3" title="직접선택" style="width:160px;">

<option value="self">직접입력</option>

<option value="naver.com">naver.com</option>

<option value="hanmail.net">hanmail.net</option>

<option value="nate.com">nate.com</option>

<option value="daum.net">daum.net</option>

<option value="paran.com">paran.com</option>

<option value="gmail.com">gmail.com</option>

<option value="hotmail.com">hotmail.com</option>

<option value="yahoo.co.kr">yahoo.co.kr</option>

<option value="empal.com">empal.com</option>

<option value="lycos.co.kr">lycos.co.kr</option>

<option value="korea.com">korea.com</option>

<option value="dreamwiz.com">dreamwiz.com</option>

<option value="freechal.com">freechal.com</option>

</select>

</div>

</td>

</tr>

+ Recent posts