<script> 
function openlocal(){ 
             var shell = new ActiveXObject("WSCRIPT.Shell");   
             shell.Run("c:\\book.txt",1);   
        } 
</script> 

  

html调用:

<a href="javascript:openlocal()">open local file</a>

  

不过仅限于IE浏览器和必须加载activeX插件,调用shell时候只能用绝对路径。

 

转载于 http://sunhuang.blogbus.com/logs/35469521.html

相关文章:

  • 2021-08-02
  • 2021-08-17
  • 2021-09-07
  • 2022-12-23
  • 2022-01-12
  • 2022-12-23
猜你喜欢
  • 2021-06-17
  • 2022-12-23
  • 2022-12-23
  • 2021-11-16
  • 2021-06-26
  • 2022-12-23
相关资源
相似解决方案