Free programming examples and instructions

jQuery append to select

Demo and Code for how to append options to select control

by Athil

Posted on 13 May 2017 Category: jQuery Views: 701

Edited on 03 Jun 2017


Hi , Here I am going to show how to append option items into a select control using jQuery

 $("#Selectcontrol").append("<option>Pine apple</option>");

Full Code

<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
    <title>Demo for append to select control using jquery</title>
         <script type="text/javascript" src="js/jquery.min.js" ></script>
    <h1>Demo for append to select control using jQuery </h1>

    <select id="Selectcontrol"> 
    <option>Apple </option>
        <option> grapes</option>


    <button id="btnAppend" onclick="Append()"> Append pineapple to select </button>

        function Append() {
            $("#Selectcontrol").append("<option>Pine apple</option>");


Leave a Comment: