embed Javascript in .bat files

前端 未结 8 1846
旧巷少年郎
旧巷少年郎 2020-12-29 17:06

Is ther any way to execute javascript from a .bat file or embed the javascript in .bat file.

I need a javascript code to write/read to a file in a local folder.This

相关标签:
8条回答
  • 2020-12-29 17:38

    on Windows, in a batch file, try

    cscript jsfile.js

    0 讨论(0)
  • 2020-12-29 17:46

    Short answer: no.

    Javascript (when run from a browser) can't access the client resources (this is by design, to avoid security risks).

    You can use Javascript outside of the browser, to create scripts, but you should provide more details on what you are trying to do (and what Operative System you expect to run this on).

    Also, check this page for more details.

    0 讨论(0)
提交回复
热议问题