In my page there is a multidimension radiobutton groups
below is my code:
at this moment, i give only static value to get all the checked radio button,
var xax = [document.forms. f1.as_mark1,as_ mark2];
my question is,how do I make it dynamic if there is more than 2 rows of radio button(eg:as_ma rk3,as_mark4 etc) at this moment,it is working fine if i put static as below
var xax = [document.forms. f1.as_mark1,as_ mark2];
i need to make it dynamic since i will not know how many as_mark will I obtain in my page
below is my code:
Code:
<input type="radio" id="as_mark1" name="as_mark1" value="1"> <input type="radio" id="as_mark1" name="as_mark1" value="2"> <input type="radio" id="as_mark1" name="as_mark1" value="3"> <input type="radio" id="as_mark2" name="as_mark2" value="1"> <input type="radio" id="as_mark2" name="as_mark2" value="2"> <input type="radio" id="as_mark2" name="as_mark2" value="3"> <input type="button" id="startx" name="startx" value="Calculate" onclick="javascript:sumitup()" />
var xax = [document.forms. f1.as_mark1,as_ mark2];
my question is,how do I make it dynamic if there is more than 2 rows of radio button(eg:as_ma rk3,as_mark4 etc) at this moment,it is working fine if i put static as below
var xax = [document.forms. f1.as_mark1,as_ mark2];
i need to make it dynamic since i will not know how many as_mark will I obtain in my page
Comment