📅  最后修改于: 2022-03-11 15:03:42.398000             🧑  作者: Mango
function disp() {
var text = document.getElementById("text");
var t = text.value.substr(text.selectionStart, text.selectionEnd - text.selectionStart);
alert(t);
}