js 文本框插入function insertAtCaret(textbox,text) { textbox.focus(); document.selection.createRange().text = text; }function inputCalc(str){addText(document.getElementById("CalcuteText"),str);}/*function addText2(oTextarea,strText){ oTextarea.focus(); document.selection.createRange().text+=strText; oTextarea.blur(); } */ //在光标位置插入文本 function addText(oTextarea,strText){ //clipboardData.setData("text",strText); oTextarea.focus(); //document.execCommand("paste"); //oTextarea.focus(); document.selection.createRange().text = strText; }[@more@]