reading selected text

I'm using the function 'var str = window.getSelection().toString();' to read the text of a webpage selected by the user but it does not seem to catch the selection. I can see the object but can't get the selection.

Comments

Sign In or Register to comment.