<script language="javascript">
/* var WshShell = WScript.CreateObject("WScript.Shell");
alert("tttttt"); alert(WshShell.ExpandEnvironmentStrings("%Temp%")); */
var WshShell = new ActiveXObject("WScript.Shell");
alert(WshShell.ExpandEnvironmentStrings("%userprofile%"));
</script>
本文通过一段JavaScript代码展示了如何使用WScript.Shell对象来获取用户的配置文件路径。此方法适用于Windows环境下需要读取环境变量的应用程序开发。
1447

被折叠的 条评论
为什么被折叠?



