1.打开本地文件或者网页链接 // 打开系统本地文件 const {shell} = require('electron'); // Open a local file in the default app var path1 = "d:\ProjectsSpace\ElectronProjects\ElectronTest2\app\html\config\record.txt"; shell.openItem(path1); //打开网页链接 // Open a URL in th
IE浏览器打开C盘,测试可用. 如果浏览器报错提示:ActiveXObject is not defined Internet 选项 -> 安全 - >安全级别,调低级别 function openFileIIs(){ try{ var obj=new ActiveXObject("wscript.shell"); if(obj){ obj.Run("c:/", 1, false ); //obj.run("osk");/*打开屏幕键
原网址:http://blog.csdn.net/cofesun/article/details/7904887javascript有个特殊的对象ActiveXObject,通过它可以访问windows的本地文件系统和应用程序 <script> function openFileIIs(filename){ try{ var obj=new ActiveXObject("wscript.shell"); if(obj){ obj.Run("\""
SaveFileDialog用于保存文件 1.新建Winform窗体应用程序,命名为SaveFileDialogDemo. 2.在界面上添加一个按钮的控件(用于打开保存文件对话框),添加文本控件,用于输入要保存的内容. 3.后台代码实现: using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System