使用Chrome浏览器打开指定html文件
例如,我想使用chrome打开当前路径下的index.html
文件,可以输入如下命令:1
"C:\Program Files (x86)\Google\Chrome\Application\chrome.exe" index.html
命令解释:
"C:\Program Files (x86)\Google\Chrome\Application\chrome.exe"
这个是谷歌浏览器(chrome)的绝对路径,因为路径中间有空格,最好用括号包裹起来。index.html
这个是html文件的相对路径。
创建批处理脚本chrome.bat来打开html文件
创建chrome.bat
文件,在其中写入:1
2@echo off
"C:\Program Files (x86)\Google\Chrome\Application\chrome.exe" %1
命令解释: