Changing <SPAN... with JS ?

Discussion in 'Javascript' started by Jeff, Oct 11, 2003.

  1. Jeff

    Jeff Guest

    Hello everyone,

    It's possible to change the XXX in this statement with JS?

    <span id="myspan" class="standard-text">XXX</span>

    Thanks very much
    Jeff, Oct 11, 2003
    1. Advertisements

  2. Jeff

    Evertjan. Guest

    Jeff wrote on 11 okt 2003 in comp.lang.javascript:
    document.getElementById("myspan").innerHTML = "with JS"

    Evertjan., Oct 11, 2003
    1. Advertisements

  3. Jeff

    DU Guest

    document.getElementById("myspan").firstChild.nodeValue = "with JS";
    is faster, more efficient, is very well supported by current browsers
    and is entirely compliant with DOM 2.

    innerHTML versus nodeValue performance comparison

    Javascript and Browser bugs:
    - Resources, help and tips for Netscape 7.x users and Composer
    - Interactive demos on Popup windows, music (audio/midi) in Netscape 7.x
    DU, Oct 11, 2003
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.