js里面有什么方法可以打开一个网页

JavaScript022

js里面有什么方法可以打开一个网页,第1张

<script>

window.location.href="新页地址"  //将本页替换成新页面

window.open("新页地址")  //弹出一个新页面

</script>

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文件就可以了