http://regexpal.com/ 上面这个网站可以用于在线检测JS的正则表达式语法 除了熟知的几个固定字符表示位置: ^ : Match the beginning of the string and, in multiline searches, the beginning of a line. $ : Match the end of the string and, in multiline searches, the end of a line. \b: Match a word
Js使用word书签填充内容 1.在模板文件中需要填充的地方插入书签 填充内容为:(|光标所在处) 填写书签名,点击添加完成: 2.使用js打开模板,获取书签位置,填充数据: function printWord(flag){ var word; try{ word = new ActiveXObject("Word.Application"); word.visible = false; }catch(e){ alert("确认是否安装了OFFICE软件,是否添加了受信站点
js获取光标位置 var TT = { /* * 获取光标位置 * @Method getCursorPosition * @param t element * @return number */ getCursorPosition:function(t){ if (document.selection) { t.focus(); var ds = document.selection; var range = ds.createRange(); var stored_range = ran