37 users online (1 members and 36 guests)  


  Results 1 to 2 of 2

Related

  1. Changing z-index etc. by clicking a button    Forum: Javascript Forum
    Replies: 2
  2. Replies: 1
  3. Changing Text With a Button    Forum: HTML Forum
    Replies: 1
  4. Changing text size with a button    Forum: Javascript Forum
    Replies: 2
  5. Changing Text Box Scroll Bar Color    Forum: HTML Forum
    Replies: 1
  1. #1
    Ragus73's Avatar
    New User

    Status
    Offline
    Join Date
    Nov 2007
    Posts
    3

    Changing Text with a button

    I'm basically trying to get it so when a button is clicked, it changes the text in the "bodyText" to the text i have set for that purpose. something like <span onclick="document.bodytext.write = 'My Text Here'">Button Name</span>
    but obviously that doesn't work, any help is appreciated.

  2. #2
    Ragus73's Avatar
    New User

    Status
    Offline
    Join Date
    Nov 2007
    Posts
    3

    Re: Changing Text with a button

    This problem was resolved today. The code used was:

    document.getElementById('youridhere').innerHTML = 'Text is ... changed!';



Tags for this Thread