js文本框插入-成都快上网建站

js文本框插入

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@]
文章标题:js文本框插入
当前地址:http://kswjz.com/article/gghcij.html
扫二维码与项目经理沟通

我们在微信上24小时期待你的声音

解答本文疑问/技术咨询/运营咨询/技术建议/互联网交流