JavaScript: Get the Selected Html in Webpage The Code Tested in Chrome: function getSelectionHtml(selection...

Please Visit: http://ift.tt/1ajReyV



JavaScript: Get the Selected Html in Webpage

The Code Tested in Chrome: function getSelectionHtml(selection) {

var range = selection.getRangeAt(0);



var div = document.createElement('div');

div.appendChild(range.cloneContents());

var htmlText = div.innerHTML;

return htmlText;

}



function p...



The Code Tested in Chrome: function getSelectionHtml(selection) { var range = selection.getRangeAt(0); var div = document.createElement('div'); div.appendChild(range.cloneContents()); var htmlText = div.innerHTML; return html...







from Public RSS-Feed of Jeffery yuan. Created with the PIXELMECHANICS 'GPlusRSS-Webtool' at http://gplusrss.com http://ift.tt/1ljWfNj

via LifeLong Community

No comments:

Post a Comment