Skip to content
master
Go to file
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 

README.md

javascript-htmlspecialchars

Description

handle view special chars or HTML ASCII in HTML

if string &#lt; show in HTML <

use javascript-htmlspecialchars

string &#lt; output in HTML &#lt;

Usage

in javascript

var str = '&lt;';
str = util.htmlspecialchars(str);

document.getElementById('area_1').innerHTML= 'innerHTML-' + str;

// jQuery
$('#area_2').html('html-' + str);
$('#area_3').append('append-' + '<span>' + str + '</span>');

About

handle view special chars in HTML

Resources

Releases

No releases published

Packages

No packages published