首页 > Electron(Atom-Shell)怎么打开windows的资源管理器?

Electron(Atom-Shell)怎么打开windows的资源管理器?

我想通过点击一个A连接或者按钮来打开一个windows的资源管理器,但不知道具体怎么操作,在文档中也没找到。


var exec = require('child_process').exec
exec('explorer')

<!DOCTYPE html>
<html>
  <head>
  <meta charset="UTF-8"> 
    <title>Hello World!</title>
    <script>
    function openTaskmgr(){
          var cp = require('child_process');
          cp.exec("taskmgr");
    };
    </script>
  </head>
  <body>
    <h1>Hello World!</h1>
    We are using io.js <script>document.write(process.version)</script>
    and Electron <script>document.write(process.versions['electron'])</script>
    <hr>
    <a href="#" onclick="openTaskmgr();return false;">打开任务管理器</a>

  </body>
</html>
【热门文章】
【热门文章】