Monday, January 25, 2016

How may I make only the selected radio button have an id so that I may catch it with Request.Form["whatever"] in web forms?

$('input[type=radio]').bind("focus", function () {
   $('input[type=radio]').each(function (item) {
      $(this).removeAttr("id");
   });
   $(this).attr("id", "whatever");
});

No comments:

Post a Comment