Found it. if (document.all) { var range = doc.body.createTextRange(); range.moveToElementText(node); range.select(); } else { var sel = doc.getSelection(); var range=doc.createRange(); range.selectNode(node); sel.removeAllRanges(); sel.addRange(range); }
Post a Comment
1 comment:
Found it.
if (document.all) {
var range = doc.body.createTextRange();
range.moveToElementText(node);
range.select();
} else {
var sel = doc.getSelection();
var range=doc.createRange();
range.selectNode(node);
sel.removeAllRanges();
sel.addRange(range);
}
Post a Comment