To get the text selection in Javascript you can use the following snippet.
Sample Javascript
function GetTextSelection() {
return (!!document.getSelection) ? document.getSelection() :
(!!window.getSelection) ? window.getSelection() :
document.selection.createRange().text;
}
RT @CodeSnippetsNET: How to get the text selection in #Javascript http://t.co/r4Bz24ytYY #js #jquery #html #php
RT @CodeSnippetsNET: How to get the text selection in #Javascript http://t.co/r4Bz24ytYY #js #jquery #html #php