jquery radio button when checked need an alert -


in application need radio group, in whenever button checked, alert occur can post value ajax post in jquery.

can me please how can in jquery?

try this:

$(function(){   $('input[type="radio"]').click(function(){     if ($(this).is(':checked'))     {       alert($(this).val());     }   }); }); 

if give radio buttons class can replace code $('input[type="radio"]') $('.someclass').


Comments

Popular posts from this blog

javascript - Enclosure Memory Copies -

php - Replacing tags in braces, even nested tags, with regex -