<script> function zmien() { if (document.forms.f1.s1.selectedIndex == 1) document.f1.b1.disabled=false; else if (document.forms.f1.s1.selectedIndex == 2) document.f1.b1.disabled=true; } </script> </head> <body> <form name="f1"> <select name="s1" onchange="zmien();"> <option>-- <option>Wlacz <option>Wylacz </select> <br /> <input name="b1" type="button" value="B" disabled> </form>
i jak z tego zrobic aby zamiast menu byl checkbox ? ktory wybiera czy button jest aktywny czy nie?