/    Sign up×
Community /Pin to ProfileBookmark

form, radio, and all its values.

lets say i have…

input type=radio name=imnotaradio value=0
input type=radio name=imnotaradio value=1
input type=radio name=imnotaradio value=2
input type=radio name=imnotaradio value=3
input type=radio name=imnotaradio value=4
input type=radio name=imnotaradio value=5

is there a javascript where i can…
for ( var i=1; i<=total_#’s_of_imnotaradio; i++ ){
alert(document.form.imnotaradio[i] );
}
?????
do something like this??
get all the values for a radio name…

and on the way can some please tell me what “attributes mean??”
and what the attributes are in my example above?
thank you, a reply will be very much appreciated..

to post a comment
JavaScript

2 Comments(s)

Copy linkTweet thisAlerts:
@FangJan 10.2006 — for ( var i=0; i&lt;document.form.imnotaradio.length; i++ ){
alert(document.form.imnotaradio[i].value );
}

Attributes of input are type, name and value

http://www.w3schools.com/html/html_standardattributes.asp
Copy linkTweet thisAlerts:
@jamestmfbongauthorJan 11.2006 — excellent!
×

Success!

Help @jamestmfbong spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.16,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...