How to write a function that can cut a string with HTML tags to an N-length string without breaking HTML tags while doing it.
The returned string doesn\'t need to b
In javascript, you can use the textContent property of DOM elements to obtain this.
HTML
Hey Visit Croatia today
Javascript
var el = document.getElementById("mytext");
console.log( el.textContent );
//alert( el.textContent ); // if you don't have firebug.