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

php - How to build a web site which gives a sub-domain dynamically to every registered user? -

Delphi Wmi Query on a Remote Machine -