The way to create a “reverse” choice is a bit unobvious. This cannot be done simply by selecting a range using the selection method addRange(), because ranges are unsent. You need to use the extend()selection method (example below).
, IE, 9: , IE 9 , , Microsoft IE 9, extend() , , , IE, . IE 10 extend(), , IE.
function selectRangeBackwards(range) {
var sel = window.getSelection();
var endRange = range.cloneRange();
endRange.collapse(false);
sel.removeAllRanges();
sel.addRange(endRange);
sel.extend(range.startContainer, range.startOffset);
}