Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

howt to disable a select tag using js

document.getElementById("one").onchange = function () {
  document.getElementById("two").setAttribute("disabled", "disabled");
  if (this.value == 'car')
    document.getElementById("two").removeAttribute("disabled");
};
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #howt #disable #select #tag #js
ADD COMMENT
Topic
Name
5+9 =