使用CScript运行Javascript? [英] Running Javascript with CScript?

查看:68
本文介绍了使用CScript运行Javascript?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试学习如何使用CScript.exe运行Javascript(而不是VBScript),但是当我尝试时,出现错误:

I'm trying to learn how to run Javascript (instead of VBScript) using CScript.exe, but when I try, I get an error:

cscript temp.js
Input Error: There is no script engine for file extension ".js".

认为这是可能的-知道有什么问题吗?

I thought this is possible -- any idea what's wrong?

推荐答案

It turns out that the .js extension wasn't associated with JSFile in the registry. Doing so fixed the problem.

这篇关于使用CScript运行Javascript?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆