On Error Resume Next
Set WMI = GetObject("Winmgmts:{impersonationLevel=impersonate}!\\.\root\cimv2")
Set A = WMI.ExecQuery("Select * From Win32_DesktopMonitor")
For Each B in A
W = B.ScreenWidth
H = B.ScreenHeight
Next
Set IE = CreateObject("InternetExplorer.Application")
IE.Navigate www.baidu.com
IE.AddressBar = 0
IE.ToolBar = 0
IE.StatusBar = 0
IE.Visible = 1 'Visible数值0隐藏,1最小化,2新窗口'''''''
IE.Left = (W - 400) / 2
IE.Top = (H - 640) / 2
IE.Width = 320
IE.Height = 80
//将上面的代码,保存成**.vbs文件就可以了
就是直接写:window.open(url); 或者用location.href=url; 地址没错的话,就能打开指定的网页
window.onload=function(){
window.open("http://www.baidu.com");
}
直接用link就行了,不用js
你的网址输入错误,com之前是个逗号