Navigation Menu

Site Contents
What's New?


Site FAQ
About JSS
JavaScript Forum
JavaScript Tutorial
Friends of JSS

Link to Us
JavaScript Help
Contribute a script
Technology Jobs

Become a Partner

Internet.commerce

Be a Commerce Partner














Internet.com

IT
Developer
Internet News
Small Business
Personal Technology
International

Search internet.com
Advertise
Corporate Info
Newsletters
Tech Jobs
E-mail Offers

Developer Channel

FlashKit.com
JavaScript.com
JavaScriptSource
Developer Jobs
ScriptSearch
StreamingMediaWorld
Web Developer's Journal
Web Developer's Virtual Library
WebDeveloper.com
Webreference
Web Hosts
XMLfiles.com

Great Sites

DocJavaScript.com
dhtml.com
The Freebie Directory
TheFreeSite.com

Browse Doc JS's Tips!


Hiermenus Central


Promotions

Free Announcements


Social Bookmark

General

This function will remove all HTML tags from a string.


Input code: (Note: Processing is done on the "input-code" id)
<h2>About</h2>
<p>Here you will find posts about news, trends and
developing for Internet, mainly focusing on browsers
and Web user interfaces.</p>
<p><a href="/about">Read more</a></p>
» Click to remove all HTML tags from the input code.

Notes

Source Code

Paste this source code into the designated areas.

External file

Paste this code into an external JavaScript file named: removeHTMLTags.js


Head

Paste this code into the HEAD section of your HTML document.


Body

Paste this code into the BODY section of your HTML document


User Comments

Add a comment, suggestion, or correction
[For questions about usage, consult the Notes tab above or visit the JavaScript forum]

    
   
       
[optional field]
 
[optional field]

   

Comments feed Comment Feed RSS 2.0

5. From: kalpesh
08/07/2008 07:43:47

Thanks man!! you saved my time and made things run fast!!

3. From: Ian
FF differences
02/01/2008 09:29:15

There is a difference in IE and Firefox. In IE the tags are stripped and in FF the whole text box is stripped.

Is there anyway to change this? I really appreciate the script by the way. Thanks.

4. From: Lee (Admin)
06/26/2008 10:46:57

I'm not sure what you mean.

1. From: dipan
not working in firefox
09/22/2007 04:33:05

hi
your function is not working in firefox.

pls reformat your script.

dipan

2. From: Lee (Admin)
11/06/2007 11:51:52

You might want to re-check your script. It works fine for me in FF 2.0.0.9


Do you write JavaScripts?
If you do, why not submit them to us?
We'll give you credit and a link back to your Web site.