...Beauty, cleaning, DIY tips and more - free to join!
   Login   Contact us   Site map   Puzzle Club   Ask a question    Newsletter

How can I amend the content a user enters in a text box?

Question asked by: knowitall

If you want to edit the content in the text box or textarea then the easiest way to do this is to make use of the Range property.

This creates a copy of the contents of the text box which you can then play about with.

Common applications are for the user to highlight the text, click a button, and then have some HTML or BBCode formatting applied around the text.

This is easily done in a through lines of code using the Range element - note that you need to do some testing for IE and Mozilla as they treat things differently.

By: Unknown
star star star star
Average rating for this answer is 4 / 5

Rate Answer
Comment or provide your answer to this question
No comments have been added to this question "How can I amend the content a user enters in a text box?".
Ask a New Question

Find out more about Computing

Computing Questions and Answers

javascript Questions and Answers

Next question: what to do to become an IT officer?

Become a Member! It's Free >>>

Share on Facebook: On Twitter: TwitterTweet this!

Question Keywords

user  enters  text  box  content  amend  

More Questions:

How Can I Learn Javascript?
What Do I Need To Buy To Make My Laptop Wireless?
I Don't Understand CSS What Is It?
What To Do To Be Familiar With Computer Hardware?
How Can I Create Graphics?