简体   繁体   中英

How to execute JavaScript in a browser from the command prompt

I am wondering if it is possible to execute JavaScript in a browser window using the command prompt in Windows. Is it possible to start chrome and execute a JS file in that new browser window, all from the command prompt?

I doubt it.

I just tried this though:

You can put javascript:alert("moo") in the browser's home page url setting, which will run as soon as you open the browser.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM