Loading
Adding Options to HTML Dropdown

Java Quick Notes

Refresh Your Java - Before Java Interview

We are Agile, believe in less Documentation - Only Quick notes (Java Interview Questions) of Java/J2ee Read more....


Not Included Yet
Not Included Yet
Not Included Yet
Not Included Yet
Not Included Yet
Not Included Yet
Not Included Yet
Not Included Yet
Not Included Yet
Not Included Yet
Not Included Yet
Not Included Yet
Not Included Yet
Not Included Yet
Not Included Yet
Not Included Yet
Not Included Yet
Not Included Yet
Not Included Yet
Not Included Yet

Go to SiteMap

Q)  Adding Options to HTML Dropdown


Ans)

Following Example Adds the States to States Dropdown

function addTheStates (dataArray,dataIDArray) {

//alert("addTheQuestions " + document.getElementById('questionList'));
 document.getElementById('statesList').options.length=0;
for (var i=0;i<dataArray.length;i++){
var option = document.createElement("option");
 option.setAttribute('value',dataIDArray[i]);
 option.innerHTML = dataArray[i];
 document.getElementById('statesList').appendChild(option);

 }

}



Back to top

------------------------- We hope you got necessary Info On -----------------------------------------

Adding Options to HTML Dropdown


Adding Options to HTML Dropdown

-------------------------------------------------------------------------------------------------------



Face Book
Request for a Mock Interview/Training

Get a PDF

Face Book
Same look (Read) on any device, this is Ads free