62,268
社区成员
发帖
与我相关
我的任务
分享
function edit(TextId, Text1, Text2) {
if ((document.selection) && (document.selection.type == "Text") && (document.selection.createRange().parentElement().id == TextId)) {
document.selection.createRange().text = Text1 + document.selection.createRange().text + Text2;
document.selection.empty();
}
else {
alert("先在输入框中选中你要改变的文字。");
}
}