Форум АНТИЧАТ

Форум АНТИЧАТ (https://forum.antichat.xyz/index.php)
-   PHP, PERL, MySQL, JavaScript (https://forum.antichat.xyz/forumdisplay.php?f=37)
-   -   jquary (https://forum.antichat.xyz/showthread.php?t=158846)

kdk 24.11.2009 13:48

jquary
 
Как можно вытащить переменные из radio????
PHP код:

<script type="text/javascript" src="js/jquery-1.2.3.js"></script>
<
form>
  <
input name="Name" id="Name" type="radio" value="1" checked><input id="Name" name="Name" type="radio" value="2" >
</
form>
<
script type="text/javascript">
<!--
$(
document).ready(function(){
  $(
":radio").click(function(){

   });
});
-->
</
script


biophreak 24.11.2009 15:51

Ну как-то так:
PHP код:

                    $(document).ready(function(){
                            $(
'form').children('input[type=radio]').each(function() {
                                
alert(this.value);
                            });
                    }); 



Время: 18:49