Javascript examples for jQuery:Select Dropdown
JQuery Append option to Dropdown <select>
<html> <head> <title>SO - 5179723</title> <meta name="viewport" content="width=device-width, initial-scale=1"> <script type="text/javascript" src="https://code.jquery.com/jquery-1.5.js"></script> <script type="text/javascript"> $(window).load(function(){/*from ww w . ja va 2 s .c o m*/ $("<option />").val("test1").text("test2").appendTo($("select")); }); </script> </head> <body> <select></select> </body> </html>