Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    New to the CF scene
    Join Date
    Sep 2002
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Question onClick Radio Box

    Hi!
    I am facing on of the CSS behavior problem. I'm just new to the CSS and HTML, therefore, I am searching help over here.

    What I want to do is, when on select the Radio box, the text of the Radio box will change to red color. Right now I am using Dreamweaver 4.0. Can this behavior set from Dreamweaver or I have to to put in some Script?

    Thank you very much!

  • #2
    Senior Coder
    Join Date
    Aug 2002
    Posts
    3,467
    Thanks
    0
    Thanked 0 Times in 0 Posts
    function colorChange(node, chk) {
    if (chk)
    node.style.color = 'red';
    else
    node.style.color = 'black';
    }

    <span><input type="radio" onClick="colorChange(this.parentNode, this.checked)">Text to change color</span>


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •