たとえば、私は次のように言っています。
<input type="checkbox" id="chk-box1" name="chk-box1" value="Check 1">Check 1
<input type="text" id="textbox1" name="textbox1" value="">
「chk-box1」をクリックしたときのテキストボックスの値は、次のようにして設定できます。
$('#chk-box1').change(function(){
var chk = $(this);
$('#textbox1').val("Textbox 1 is checked")('selected', chk.attr('checked'));
})
しかし、ボックスがオフになっているときにテキストボックスの値を空に設定するにはどうすればよいですか?$('#textbox1').val("")