ie:document.selection.createRange().text其他:var o = document.getElementById();o.value.substr(o.selectionStart,o.selectionEnd - o.selectionStart);