php - How do I change button name onselect? -
i want add name="question" selected radio button. (and remove if user selects other). how can it?
<input type="radio" value="female" />female <input type="radio" value="male" />male thanks
you need check out jquery
http://api.jquery.com/attr/ http://api.jquery.com/css/
$("input[type='radio']").change( function() { $(this).css('display' 'hidden'); $(this).attr('name', 'question'); });
Comments
Post a Comment