Javacript, convertir contenido html a texto plano

Javascript No Comments »

Si en algun momento se han preguntado como convertir contenido html a texto plano, este script me parece que les puede ayudar.

function htmlEntityDecode(str) {
var ta=document.createElement(”textarea”);
ta.innerHTML=str.replace(/</g,”&lt;”).replace(/>/g,”&gt;”);
return ta.value;
}

Read the rest of this entry »

WP Theme & Icons by N.Design Studio
Entries RSS Comments RSS Log in