JavaScript Scripts





Español Français 中文 Deutsch Portuguese Japanese nederlands
   
 
Free Java Script Codes
Javascript List All
Slide Show Slide Show
Ad Display Ad Display
Image Effect Image Effect
Animated Image Effects Animated Image Effects
Form Validation Form Validation
Color Picker Tool Color Picker Tool
Formatting Forms Formatting Forms
Select All Select All
Dynamic Form Select Dynamic Form select
Dynamic Color Dynamic Color
Calendar Script Calendar
Textbox Counter Textbox Counter
Alphanumeric Alphanumeric
Date Time Script Date & Time
Stop Watch Script Stop Watch script
Delete Repeated Values Delete Repeated Values
Pagination Pagination
Random Generator Random Generator
Animated Text Animated Text
Cursor Position Cursor Position
User Info Window / User Info
Security Security / Authenticate
Bookmark Bookmark
Mouse Effects Mouse Effects
Title Bar Title Bar
Status Bar Status Bar
Country List Country List
Free Games Free Games
Calculators Calculators
 




Remove/Strip Html tags Java Script


About
This javascript function will help you to remove/strip HTML tags typed in text area or in text box.


Features
a)You can remove the html tags typed in a textarea/textbox.
b)This javascript displays strips any character or tags given inside the tag.
c)Just copy the code in to your page and use it.
d)Simple and ease of use.

Preview for Strip HTML Tag

Type your data with HTML Tags in Textarea / Textbox:


Code
  Javascript Code
<!-- Script by hscripts.com -->
<script type="text/javascript">
function stripHTML(){
var re = /(<([^>]+)>)/gi;
for (i=0; i < arguments.length; i++)
arguments[i].value=arguments[i].value.replace(re, "")
}
</script>
<!-- Script by hscripts.com -->



  HTML Code
<!-- Script by hscripts.com -->
<form name="myform">
<textarea style="background-color:f0f0f0; border 1px border:1px solid #afc784;" name=remove rows=4 cols=40></textarea><br>
<input type="button" value="Remove HTML Tags" onClick="stripHTML(this.form.remove)">
</form>
<!-- Script by hscripts.com -->

Release Date - 23-12-2007
Get free version without ©copyright link for just 5 price

For customization of this script or any script development, contact us at support@hscripts.com


Usage
Here we have explained how to use the strip html tag javascript with the help of a form. When you click remove HTML tags button, it will remove the html tags entered into textbox.
  1. Copy the javascript code into the <head> part of your HTML page.
  2. Copy the HTML code, to create a textarea into the <body> tag.
    <form name="myform" METHOD=POST>
    <textarea name="remove" rows=3 cols=40</textarea>
    <input type="submit" value="Strip HTML tags" onSubmit="stripHTML(this.form.remove)">
    </form>
  3. In the preview of strip HTML tags we have used form field as button instead of submit to demonstrate its functionality
  4. The java script function "StripHTML()" will remove the HTML tags typed in textarea or text box.



License
- The javascript (misspelled as java script) is given under GPL License
- i.e. Free use for those who use the codes as it is.
- Free, if your modification does not remove our copyright information and links.
- Click Here for detailed license information.
- You can purchase the script if your requirements does not meet our GPL License terms.
Other Links

web hosting