djonA,
<!DOCTYPE HTML>
<html>
<head>
<title>Untitled</title>
<meta charset="utf-8">
</head>
<body>
<input id="tata" type="checkbox"> Чекбокс
<input id="toto" type="text" value="1">
<script type="text/javascript">
document.getElementById('tata').checked = document.getElementById('toto').value
document.getElementById('tata').onclick = function () {
if (this.checked) document.getElementById('toto').value = 1; else document.getElementById('toto').value = '';
}
</script>
</body>
</html>