Radio button help

Hello, I'm a beginner in JavaScript so please bear with me. I do have a lot of C/C++ programming experience so programming isn't new, just JS.
Anyway, I need help with accessing a radio button in a form in JS. I want to use an if statement to check to see if a certain button is set and I can't figure it out. I've tried looking it up in a couple books I have but it hasn't helped. Could someone please help?

Thanks,
X

Comments

  • : Hello, I'm a beginner in JavaScript so please bear with me. I do have a lot of C/C++ programming experience so programming isn't new, just JS.
    : Anyway, I need help with accessing a radio button in a form in JS. I want to use an if statement to check to see if a certain button is set and I can't figure it out. I've tried looking it up in a couple books I have but it hasn't helped. Could someone please help?
    :
    : Thanks,
    : X
    :

    write document.formname.radiobuttonname[index]

    eg.

    document.myForm.radio1[0] to access the first radio button in radio button set named radio1 insie form myForm




Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

In this Discussion