jquery get elements by name

14,530
jQuery('#myForm select[name=foo]').each(function () { 
    jQuery(this).attr('name', 'bar') 
});
Share:
14,530

Related videos on Youtube

mike
Author by

mike

Updated on April 21, 2022

Comments

  • mike
    mike about 2 years

    Hi there can I get code to get a list dropdown of elements in a form by name and also rename them at the same time thanks

    • Gromski
      Gromski almost 14 years
      Hi there can you please be much much much more specific about what you want and maybe what you have tried already and where you're stuck and maybe also use some punctuation thank you