Сообщение от Slavok47
|
не работает
|
плохо читали!
<input type="checkbox" name="" />
<input type="checkbox" name="" disabled="disabled" />
<script type="text/javascript">
window.onload = function(){
var input = document.getElementsByTagName('input');
input[0].onclick = function(){
input[1].disabled = (input[1].disabled == 0) ? 1 : 0;
};
};
</script>
или
<input type="checkbox" name="input" />
<input type="checkbox" name="input" disabled="disabled" />
<script type="text/javascript">
window.onload = function(){
var input = document.getElementsByName('input');
input[0].onclick = function(){
input[1].disabled = (input[1].disabled == 0) ? 1 : 0;
};
};
</script>