Click here to Skip to main content
15,940,550 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
hi sir gud afn
plz help me any one
iam taking 1 textbox and 1 dropdown,
to enter value in textbox,
for example enter value 10 to display 1 to 10 values dynamically display in dropdown by using jquery any one suggest me

thanks for advance
Posted
Comments
Nelek 30-Sep-13 20:47pm    
Get used to write proper english please. Chat-SMS-Text makes your message looks not serious, on the other hand... not all people are english speakers and may not understand what you say

1 solution

after you add jquery in your page 

JavaScript
$(document).ready(function(){
   $("TB_id").change(function () {
      for (var i = 1; i < $("TB_id").val(); i++) {
          $("dropdown_id").add("<option>"+i+"</option>");
      }
  });
});
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900