Activar o desactivar javascript con checkbox?

(1/1)

CWeeD:
Tengo este código javascript para que me aleatorice las opciones de un combobox:
<select name="SE1">
<option value="1=" selected class="select"></option>
<option value="2"></option>
<option value="3="></option>
<option value="4"></option>
<option value="5"></option>
</select>
<script>
var select = document.getElementById('SE1');
var items = select.getElementsByTagName('option');
var index= Math.floor(Math.random() * items.length);

select.selectedIndex = index;
</script>
El problema es que no se como hacer para activarlo o desactivarlo con un checkbox...
Gracias de antemano

AFelipeTrujillo:
Código
<html>
<head>
 <meta http-equiv="content-type" content="text/html; ">
 <meta name="generator" content="PSPad editor, www.pspad.com">
 <title> :: Comunidad Codificada ::</title>
 <script>
   window.onload = function(){
     var miCheckbox = document.getElementById('miCheckbox');
     miCheckbox.onclick = function(){
       var miSelect = document.getElementById('miSelect');
       if(miCheckbox.checked == true)
           miSelect.disabled = 'disabled';
       if(miCheckbox.checked == false)
           miSelect.disabled = '';
     }
   }
 </script>
 
</head>
<body>
 <select id="miSelect">
  <option value="0">a</option>
  <option value="1">b</option>
  <option value="2">c</option>
 </select>
 
 <input type="checkbox" id="miCheckbox">
</body>
</html>

Revise bien si es lo q necesita !!  :rolleyes:

Navegación

[0] Índice de Mensajes