Windows控制台命令可在Internet Explorer 7中打开多个页面
时间:2020-03-06 14:34:38 来源:igfitidea点击:
如何使用单个DOS命令在Internet Explorer 7中打开多个页面?批处理文件是执行此操作的唯一方法吗?
谢谢!
解决方案
不幸的是,无法将多个URL作为命令行参数。这是一篇博客文章,详细介绍了通过Javascript进行编码的另一种方法(相当复杂)。
批处理文件将作为一种快速而肮脏的解决方案。
@echo off @setlocal :openurl set url=%~1 if "%url:~0,4%" == "http" ( start "%ProgramFiles%\Internet Explorer\iexplore.exe" "%url%" ) if NOT "%url:~0,4%" == "http" ( start "%ProgramFiles%\Internet Explorer\iexplore.exe" "http://%url%" ) shift if "%~1" == "" goto :end goto :openurl :end
编辑:添加了对不带http处理程序前缀的域名的支持。