Search
 
SCRIPT & CODE EXAMPLE
 

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");
};
Comment

PREVIOUS NEXT
Code Example
Javascript :: javascript thousand separator 
Javascript :: hide and show modal jquery 
Javascript :: disable text selection in js 
Javascript :: js stop redirect 
Javascript :: package json proxy 
Javascript :: random in a range js 
Javascript :: jquery closest 
Javascript :: class constructor 
Javascript :: vuex v-model 
Javascript :: js date subtract days 
Javascript :: jquery open image in new tab 
Javascript :: reset navigation to specific tab react-navigation 
Javascript :: what is niceScroll 
Javascript :: jquery remove style 
Javascript :: javascript add element above 
Javascript :: javascript confirm delete 
Javascript :: convert iso 8601 to utc javascript 
Javascript :: mktime in js 
Javascript :: refresh event in javascript 
Javascript :: append before parent jquery 
Javascript :: Using webpack 5. Reason: future.webpack5 option enabled https://nextjs.org/docs/messages/webpack5 
Javascript :: onload multiple functions 
Javascript :: send multiple files using formdata jquery 
Javascript :: how to display items quantity into select input field 
Javascript :: change url with javascript after 5 seconds 
Javascript :: js delete object in dict 
Javascript :: jquery debounce 
Javascript :: jquery vdn 
Javascript :: autocomplete react vscode 
Javascript :: test variable type javascript 
ADD CONTENT
Topic
Content
Source link
Name
7+1 =