<script>
function test()
{
if ( $("#checkbox").attr('checked'))
document.getElementById('text').value = document.getElementById('checkbox').value;
else
document.getElementById('text').value = 'no';
}
</script>
<input id="checkbox" type="checkbox" name="check" value="132154" />
<input id="text" type="text" />
<input type="button" onclick="test()" value="Button" />