How to print html tags as plain text in html page using javascript andrey четверг, 13 марта 2014 г. No Comment

In this post i'm going to share how to print html tags as plain text in html page using javascript.

browser read < (greater than) and > (lesser than) symbols as for html tags. So, if we use these symbols in plain text, browser will consider it as a html tags.

So we need to replace < with & l t ; and >with & g t ; to print HTML tags as a Plain Text.

If you feel hard to write your code with these changes, leave it. Use this below javascript function to convert html tags to plain text.

Here is the javascript function

HERE YOU CAN FIND THE DEMO
In this post i'm going to share how to print html tags as plain text in html page using javascript.

browser read < (greater than) and > (lesser than) symbols as for html tags. So, if we use these symbols in plain text, browser will consider it as a html tags.

So we need to replace < with & l t ; and >with & g t ; to print HTML tags as a Plain Text.

If you feel hard to write your code with these changes, leave it. Use this below javascript function to convert html tags to plain text.

Here is the javascript function

HERE YOU CAN FIND THE DEMO
by Jillur Rahman

Jillur Rahman is a Web designers. He enjoys to make blogger templates. He always try to make modern and 3D looking Templates. You can by his templates from Themeforest.

Follow him @ Twitter | Facebook | Google Plus

No Comment