www.webdeveloper.com
Results 1 to 3 of 3

Thread: How to update text?

  1. #1
    Join Date
    Nov 2005
    Location
    shores of Lake Ontario, Canada
    Posts
    57

    Question How to update text?

    I want to update text, and have it displayed like text. I can do it as an updatable button, but well, it looks like a button, not like background. So not to pretty.
    Thanks.

    Code:
    document.getElementById('title0').value = "Title";
    
    <input type = "button" id=title0 />
    Last edited by notageek; 01-24-2006 at 07:57 PM.

  2. #2
    Join Date
    Nov 2002
    Location
    Baltimore, Maryland
    Posts
    12,270
    Code:
    document.getElementById ('foo').firstChild.data = 'bar'
    
    <span id="foo">Foo</span>
    Note, the containing element cannot start out empty for this method to work.
    “The power of the Web is in its universality. Access by everyone regardless of disability is an essential aspect.”
    —Tim Berners-Lee, W3C Director and inventor of the World Wide Web

  3. #3
    Join Date
    Nov 2005
    Location
    shores of Lake Ontario, Canada
    Posts
    57
    looks much better now. Thanks.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

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



Recent Articles