用vbs、js 实现访问指定页面

简介: 在计划任务中添加Run.vbs 或 Run.jsRun.vbs ' Create an instance of IEDim IESet IE = CreateObject("InternetExplorer.

在计划任务中添加Run.vbs 或 Run.js

Run.vbs

img_a6339ee3e57d1d52bc7d02b338e15a60.gif '  Create an instance of IE
img_a6339ee3e57d1d52bc7d02b338e15a60.gif
Dim  IE
img_a6339ee3e57d1d52bc7d02b338e15a60.gif
Set  IE  =   CreateObject ( " InternetExplorer.Application " )
img_a6339ee3e57d1d52bc7d02b338e15a60.gif 
' Run your URL
img_a6339ee3e57d1d52bc7d02b338e15a60.gif
ie.navigate(" http://spring.cnblogs.com/ ")
img_a6339ee3e57d1d52bc7d02b338e15a60.gifie.visible
= 1
img_a6339ee3e57d1d52bc7d02b338e15a60.gif
' Clean up
img_a6339ee3e57d1d52bc7d02b338e15a60.gif
Set  IE  =   Nothing  



Run.js

img_a6339ee3e57d1d52bc7d02b338e15a60.gif //  Create the HTML message to display.
img_a6339ee3e57d1d52bc7d02b338e15a60.gif
var  html  =   "" ;
img_a6339ee3e57d1d52bc7d02b338e15a60.gif    html 
+=   " <html><head><title>运行窗口</title></head><body> " ;
img_a6339ee3e57d1d52bc7d02b338e15a60.gif        html 
+=   " <font face=verdana></font> " ;
img_a6339ee3e57d1d52bc7d02b338e15a60.gif        html 
+=   " </body></html> " ;
img_a6339ee3e57d1d52bc7d02b338e15a60.gif
img_a6339ee3e57d1d52bc7d02b338e15a60.gif
//  Create Internet Explorer Object
img_a6339ee3e57d1d52bc7d02b338e15a60.gif
ie  =   new  ActiveXObject( " InternetExplorer.Application " );
img_a6339ee3e57d1d52bc7d02b338e15a60.gif
//  Define how the window should look
img_a6339ee3e57d1d52bc7d02b338e15a60.gif
ie.left        =   50 ;
img_a6339ee3e57d1d52bc7d02b338e15a60.gifie.top        
=   50 ;
img_a6339ee3e57d1d52bc7d02b338e15a60.gifie.height     
=   510 ;
img_a6339ee3e57d1d52bc7d02b338e15a60.gifie.width      
=   470 ;
img_a6339ee3e57d1d52bc7d02b338e15a60.gifie.menubar    
=   0 ;
img_a6339ee3e57d1d52bc7d02b338e15a60.gifie.toolbar    
=   0 ;
img_a6339ee3e57d1d52bc7d02b338e15a60.gif
//  Set the browser to a blank page
img_a6339ee3e57d1d52bc7d02b338e15a60.gif
ie.navigate( " http://spring.cnblogs.com/ " );
img_a6339ee3e57d1d52bc7d02b338e15a60.gif
//  Show the browser
img_a6339ee3e57d1d52bc7d02b338e15a60.gif
ie.visible = 1 ;
img_a6339ee3e57d1d52bc7d02b338e15a60.gif
//  Open a stream and write data.
   ie.document.open;
   ie.document.write( html );
   ie.document.close; 
img_a6339ee3e57d1d52bc7d02b338e15a60.gif

img_a6339ee3e57d1d52bc7d02b338e15a60.gif
目录
相关文章
|
14天前
|
JavaScript 前端开发 容器
AJAX载入外部JS文件到页面并让其执行的方法(附源码)
AJAX载入外部JS文件到页面并让其执行的方法(附源码)
16 0
|
1月前
|
JavaScript 前端开发 Java
springboot从控制器请求至页面时js失效的解决方法
springboot从控制器请求至页面时js失效的解决方法
15 0
springboot从控制器请求至页面时js失效的解决方法
|
1月前
|
Web App开发 前端开发 JavaScript
编程笔记 html5&css&js 004 我的第一个页面
编程笔记 html5&css&js 004 我的第一个页面
|
3月前
|
JavaScript
如何使用JS控制指定页面大小开启全屏和退出全屏
如何使用JS控制指定页面大小开启全屏和退出全屏
25 0
|
3月前
|
JavaScript 数据安全/隐私保护
|
3月前
|
JavaScript
如何在JS中实现修改URL参数而不刷新页面
如何在JS中实现修改URL参数而不刷新页面
60 1
|
3月前
|
存储 JavaScript
JS中从a页面跳转到b页面,自动执行一次点击事件
JS中从a页面跳转到b页面,自动执行一次点击事件
|
1月前
|
JavaScript 前端开发
springboot+layui从控制器请求至页面时js失效的解决方法
springboot+layui从控制器请求至页面时js失效的解决方法
15 0
|
3月前
|
JavaScript
如何用js在页面中添加元素?
如何用js在页面中添加元素?
27 0
|
22天前
|
JavaScript 前端开发
JS:如何创建新元素并添加到页面中
JS:如何创建新元素并添加到页面中
23 1