By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
464,728 Members | 1,103 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 464,728 IT Pros & Developers. It's quick & easy.

Change Text Line Display?

P: 224
hi there...

is it possible to change text on a page that is just on a line (without being in a specific textbox or something)... currently the text i'd like to change is in a DIV, but i can't think of a way to make it change... this is what i have now:

Expand|Select|Wrap|Line Numbers
  1. <html>
  2. <script type="text/javascript">
  3. function ChangeText()
  4. {
  5. if (document.getElementById('text').value == "This is the text!") {document.getElementById('textline') == "This is the text!";}
  6. // ??? 
  7. }
  8. </script>
  10. <body onLoad = "ChangeText()">
  11. <input type="text" name="text" id="text" value="This is the text!">
  12. <div id="textline">get rid of this text<br></div>
  13. </body>
  14. </html>
any ideas?
Feb 23 '07 #1
Share this Question
Share on Google+
2 Replies

Expert 100+
P: 1,208
document.getElementById('textline').innerHTML = "blah blah"
Feb 23 '07 #2

P: 224
document.getElementById('textline').innerHTML = "blah blah"
oh THAT'S what's "innerHTML"... i've seen that phrase so many times but never really knew what it was...

thanks a lot iam_clint!
Feb 23 '07 #3

Post your reply

Sign in to post your reply or Sign up for a free account.