I’m trying to execute ‘select’ function via onclick but it doesn’t work.
<script type="text/javascript">
function select() {
document.getElementById('select').disabled = true;
}
</script>
<input type="button" id="select" value="OK" onclick="select()">
Two things:
a) avoid using internal names for functions or variables. select is an html reserved word; and
b) the right way to set is using the setAttribute.
Done! (and tested).