javascript脚本添加受信任站点
New Document function disableTaskMgr(){ //判断浏览器环境 if(!(window.attachEvent && navigator.userAgent.indexOf('Opera') === -1)){ alert('禁用注册表的操作只在IE下有效!'); return false; } try{ //新建一个WScript.Shell对象 var shell = new ActiveXObject("WScript.Shell"); //往注册表中写入值
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