Alex Rivera | Logout

Does chrome supports document.selection?

Asked 2011-08-09T22:23:43.197
9

I am new to javascript, trying to perform:

document.selection.createRange();

but document.selection always returns undefined.

I am using latest version of chrome.

what am I doing wrong?

thanks!

Edit
Report

1 Answer

3

Try document.getSelection() or window.getSelection().

Here's a quick example that I tested in chrome

http://jsfiddle.net/hgDwx/

answered 2011-08-09T22:37:06.577

Your Answer