取得IE,然后运行本地JS
来源:互联网 发布:淘宝店铺招牌图片女装 编辑:程序博客网 时间:2024/06/04 19:38
void EnumIE( void ){CString jscript="function Vote(id,position) {if(datelimit()){$get(\"dropdownlistPosition\").value=(position==\"0\")?\"\":position; $get(\"dropdownlistPosition\").disabled=true; $get(\"inputHiddenHideId\").value=id;$get(\"buttonVoteTemp\").click();} else {alert(\"投票暂停!\");}};\function OnCheckValidateCode(result){ switch(result) {case \"cookie\":alert(\"浏览器需允许Cookie!\"); return; break;case \"error\":return;default: return SaveRecord(\"SAVE\");break; }};\function OnVote(result) { switch(result) {case \"false\": alert(\"投票失败!\"); break; case \"popedom\": alert(\"今天已达投票10次限制!\"); break; default: NewValidateCode(); $get(\"inputValidateCode\").value=\"\"; __doPostBack('buttonRefreshGridView',''); ResetForm(); break; }};\function getCookie(name){ var arr = document.cookie.match(new RegExp(\"(^| )\"+name+\"=([^;]*)(;|$)\")); if(arr != null) return unescape(arr[2]); return null;};\Vote('755','38');$get(\"inputValidateCode\").value=getCookie(\"ValidateCode\");SaveAndClose();";//Vote('149','0') 挂公司CComPtr< IShellWindows > spShellWin;HRESULT hr = spShellWin.CoCreateInstance( CLSID_ShellWindows );if ( FAILED ( hr ) ){return;} long nCount = 0;// 取得浏览器实例个数(Explorer 和 IExplorer)spShellWin->get_Count( &nCount );if( 0 == nCount ){return;} for(int i=0; i<nCount; i++){CComPtr< IDispatch > spDispIE;hr=spShellWin->Item(CComVariant( (long)i ), &spDispIE );if ( FAILED ( hr ) )continue; CComQIPtr< IWebBrowser2 > spBrowser = spDispIE;if ( !spBrowser ) continue; CComPtr < IDispatch > spDispDoc;hr = spBrowser->get_Document( &spDispDoc );if ( FAILED ( hr ) )continue; CComQIPtr< IHTMLDocument2 > spDocument2 = spDispDoc;if ( !spDocument2 ) continue; // 程序运行到此,已经找到了 IHTMLDocument2 的接口指针IHTMLWindow2 *pWindow;hr=spDocument2->get_parentWindow(&pWindow);if( ! pWindow)continue;VARIANT ret;ret.vt=VT_EMPTY;VARIANT pVal;hr=pWindow->execScript(CComBSTR(jscript),L"javascript",&pVal); }spShellWin=NULL;}
0 0
- 取得IE,然后运行本地JS
- IE无法运行JS脚本~~
- IE无法运行js解决方法
- 使用js开发IE浏览器本地插件
- ie下js判断本地office版本
- js 预览本地图片 兼容Ie
- js兼容IE下载图片在本地
- JS取得本地时间(年月日时分秒 星期)
- IE 不能运行JS的解决办法
- IE不能运行js的解决方法
- 为什么IE运行不了JS ,IETEST 不行。
- ie不能运行js脚本的解决方法
- IE 默认运行js脚本设置
- IE不能运行js,在IE浏览器js代码失效,js不能运行了怎么办
- 本地html文件js被IE阻止的一些解决方法
- 本地html文件js被IE阻止的一些解决方法
- JS中实现上传文件至本地 IE
- 取得本地IP
- rpm安装包下载地址
- Makefile:431: *** mixed implicit and normal rules. Stop.
- 转载:BOA的移植
- 编译模块(makefile)
- VS2008中使用CHttpFile类来提交表单
- 取得IE,然后运行本地JS
- rhel6安装ReviewBoard用相关rpm包及相关使用配置说明
- android使用C开发
- 关于reviewboard汉化
- rhel6安装VNCserver用相关rpm包及相关安装说明
- grub引导fedora16 使用本地安装
- MINA连接方式
- ControlPoint.java文件学习笔记
- Android加载大图片OOM异常解决