1 <script language=VBscript>
2 Set WshShell = CreateObject("WScript.Shell")
3 WshShell.Run "%windir%\notepad" ,3,false
4 </script>
5
2 Set WshShell = CreateObject("WScript.Shell")
3 WshShell.Run "%windir%\notepad" ,3,false
4 </script>
5
但是这要看客户端IE的安全设定
1 <script language=javascript>
2 <!--
3 function aa(){
4 var WshShell = new ActiveXObject("WScript.Shell");
5 var oExec = WshShell.Exec("notepad");
6 }
7 -->
2 <!--
3 function aa(){
4 var WshShell = new ActiveXObject("WScript.Shell");
5 var oExec = WshShell.Exec("notepad");
6 }
7 -->
本文展示了如何利用VBScript及JavaScript脚本技术在Windows环境下调用记事本程序。通过创建WScript.Shell对象,可以实现跨语言执行本地应用程序的功能。此方法依赖于客户端Internet Explorer的安全设置。
242

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



