摘要:
获取textarea的光标位置,并插入数据var start=0; var end=0; function add(){ var textBox = document.getElementById("ta"); var pre = textBox.value.substr(0, start); var post = textBox.value.substr(end); textBox.value = pre + document.getElementById("inputtext").value + post; } function savePos(te 阅读全文