Rahul Thapa
Query: 10 / Answer: 13

27th Jul 2017 .

How to remove items from a dropdown list by javascript


Answers

Raja Swain
Query: 10 / Answer: 9

27th Jul 2017 .

<select id="colorSelect"> 
<option>Red</option> 
<option>Green</option> 
<option>White</option> 
<option>Black</option> 
</select> 
<input type="button" onclick="removecolor()" value="Select and Remove"> 
 
 
 
function removecolor()
{
var x=document.getElementById("colorSelect");
x.remove(x.selectedIndex);
}

 


  •  Information
  • About Forum

    This educational forum is produly developed by betaQsolutions-A leading software company in Odisha. This forum is developed to discuss the educational topics only betweeen the Students, teachers, Parents & Experts. Topic related to Career, Syllabus, Subjects, Questions, Exams etc are allowed to discuss here.

  • Statistics

    Total topics 43 • Total Query 1115 • Total members 247 • Total Answered 1286