1. 首页
  2. 行业
  3. 旅游
  4. 往光标所在位置插入值的js代码

往光标所在位置插入值的js代码

上传者: 2020-12-13 10:04:25上传 PDF文件 16.98KB 热度 30次
代码如下: /** *往输入域中插入字符串(光标所在位置) *@param $t document.getElementById(‘fieldId’) *@param myValue 要插入的值 ** function addSplitToField($t,myValue){ if (document.selection) { $t.focus(); sel = document.selection.createRange(); sel.text = myValue; $t.focus(); }else if($t.sel
下载地址
用户评论