I can get selected text using this code in internet explorer:
var selectedText;
// IE version
if (document.selection != undefined)
{
textComponent.focus();
var sel = document.selection.createRange();
selectedText = sel.text;
}
but, how to delete selected text in TEXTAREA, for example, using JavaScript in both Google Chrome and Internet Explorer?