JS noob needs help (simple)

Discussion in 'JavaScript' started by x0x, Mar 13, 2010.

  1. #1
    I am making a function that changes all options to their default values (radios, checkboxes, dropdown and text boxes). Right now I only know how to fill a textbox via JS...

    var efour = document.getElementById("four");
    efour.value = "Text....";

    four is the textbox


    How do I change the rest of the options? Radios, checkboxes and dropdowns.
     
    x0x, Mar 13, 2010 IP
  2. krsix

    krsix Peon

    Messages:
    435
    Likes Received:
    11
    Best Answers:
    0
    Trophy Points:
    0
    #2
    selected, option/value, checked, for divs/spans it's innerHTML


    (no particular order)
     
    krsix, Mar 13, 2010 IP