document.getElementById("mainDiv").InnerText
It works fine in chrome. So tried to remove the HTML tags from the InnerHTML string. Below is the solution for that. var html = document.getElementById("mainDiv");
var text = html.replace(/<\S[^><]*>/g, '');
No comments:
Post a Comment