HTML Entity
<!DOCTYPE HTML>
<html>
<head>
<meta charset="UTF-8">
<title>Interval</title>
<script src="http://code.jquery.com/jquery-latest.min.js"></script>
<script>
window.onload = function(){
function htmlentities(s){ // Convert all applicable characters to HTML entities
//
// + original by: Kevin van Zonneveld (http://kevin.vanzonneveld.net)
var div = document.createElement('div');
var text = document.createTextNode(s);
div.appendChild(text);
return div.innerHTML;
}
var eTextarea = document.getElementById('eTextarea');
var sContent = htmlentities('</div>');
eTextarea.appendChild(document.createTextNode(sContent));
};
</script>
</head>
<body>
<textarea id="eTextarea"></textarea>
</body>
</html>