嗨,我开始了我的编码之路并坚持了这样的事情:
<form>
<input type="radio" name="liczba" value="1" /> Jedno pokolenie (3 PT)<br/>
<input type="radio" name="liczba" value="2" /> Dwa pokolenia (5 PT) <br/>
<input type="radio" name="liczba" value="3" /> Trzy pokolenia (7 PT) <br/>
<form>
<div id="Generator_Nemuraj" class="button"><br/> <p>Generuj </p></div>
我尝试使用以下代码获取选定收音机的值:
<script type="text/javascript">
$(document).ready(function () {
$('#Generator_Nemuraj').click(function () {
alert("klik");
var val = $('input:radio[name=liczba]:checked').val();
alert(val);
});
});
</script>
请帮忙 :)