Javascript examples for DOM:Element setAttribute
Set element attribute via setAttribute method
<html> <head> <meta name="viewport" content="width=device-width, initial-scale=1"> <script type="text/javascript"> window.onload=function(){/*from w w w. j av a 2s . co m*/ document.getElementById('freq2').setAttribute('disabled', true); } </script> </head> <body> <select id="freq2"> <option>Choose an option</option> </select> </body> </html>