aspdotnet-suresh offers articles and tutorials,csharp dot net, articles and tutorials,VB.NET Articles,Gridview articles,code examples of 2.0 /3.5,AJAX,SQL Server Articles,examples of .net technologies

How to Clear Dropdown list Values using jQuery & Bind New Values

Mar 19, 2014

Here I will explain how to clear dropdown values using
jQuery and bind new values to dropdownlist using jQuery or clear items of dropdownlist using jQuery.

To clear dropdown values and bind new values to dropdownlist using jQuery we need to write the code like as shown below

<html xmlns="">
<title>Clear dropdown values in jQuery</title>
<script type="text/javascript" src=""></script>
<script type="text/javascript">
function cleardropdown() {
// To clear dropdown values we need to write code like as shown below
// Bind new values to dropdown
$('#ddluser').each(function() {
// Create option
var option = $("<option />");
option.attr("value", '0').text('Select User');
<form id="form1">
<b>Select User:</b>
<select id="ddluser">
<option value="0">Select user</option>
<option value="1">Suresh Dasari</option>
<option value="2">Rohini Dasari</option>
<option value="3">Praveen Alavala</option>
<option value="4">Sateesh A</option>
<input type="button" id="btnclear" onclick="cleardropdown()" value="Clear Dropdown" />

For live demo click below button

Select User:

If you enjoyed this post, please support the blog below. It's FREE!

Get the latest,, VB.NET, jQuery, Plugins & Code Snippets for FREE by subscribing to our Facebook, Twitter, RSS feed, or by email.

subscribe by rss Subscribe by RSS subscribe by email Subscribe by Email


Unknown said...


Unknown said...

Sir, I am creating a website in which user can download the android applications, I need a code by which i can find how many people download a perticular application, I have 50 applications for download.

Anonymous said...

Very good programming.

Vishnu Das said...

hai suresh...its very good

Give your Valuable Comments

Note: Only a member of this blog may post a comment.

© 2015 All Rights Reserved.
The content is copyrighted to Suresh Dasari and may not be reproduced on other websites without permission from the owner.