www.webdeveloper.com
Results 1 to 4 of 4

Thread: Realtime text printing from input box/textarea.

  1. #1
    Join Date
    Aug 2010
    Posts
    32

    Realtime text printing from input box/textarea.

    Hey, guys! How do you print text on a website as you type the text into a input box or textarea? I've seen this in a few places but can't remember for the life of me how this is accomplished. I think I've done this in the past but have no idea how to do it now.

    Basically, you type into an input box/textarea and it prints the text on the page in realtime just underneath the input box/textarea where you're typing. Any ideas? Thanks!

    - Lono

  2. #2
    Join Date
    Mar 2010
    Posts
    2,803
    Code:
     
    <div id="container">
           <input type="text" name="txtIn" onkeyup="document.getElementById('outTxt').innerHTML = this.value;"
    </div>
     
    <div id="outTxt"></div>
    and if this is part of a school assignment, I want 30% of your mark

  3. #3
    Join Date
    Aug 2010
    Posts
    32
    Haha! No, I'm not a student...I'm 26, though I guess that doesn't matter. I'm just trying to figure out a few things so I can try to implement them in a site I'm working on for my mom. That works great! Thanks!

    - Lono

  4. #4
    Join Date
    Mar 2010
    Posts
    2,803
    you're welcome

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