4/20/2011

How to Add option to select box by jquery

I have write the below code to add option to select drop down by jquery. Add value to the below input box then click on add button.You can see the effect.That option will be added to the below selectbox

The code you need to write is

$('#selectbox').append($("<option></option>").attr("value",option_value).text(text_to_display));

No comments:

Post a Comment