I want to get the value of the current
<input type="radio"> element in its
I need something like:
<input type="radio" name="myRadio" value="something" onClick="theValueOfThisInput">
I can't use
getElementById() because all my radio buttons have the same id.
I've currently done it by wrapping all the inputs in a
<div> and getting the elements of the
<div> by index, but I won't even bother posting it because I don't think it would be helpful to anyone.
Can someone recommend a good way to do this ?
Have you tried
this.value should certainly work.
And the 'alert' function can be replaced with whatever function call you wish.