---
title: "网页中打开notepad,word"
author: "deejay"
date: "2011-08-15T09:05:25Z"
tags: []
categories: ["Web前端"]
slug: "notepad-word"
draft: false
lastmod: "2011-08-15T09:05:25Z"
id: 1149203
url: "https://deejay.iteye.com/blog/1149203"
---

&lt;script   language="JavaScript"&gt;   
  function   open\_exe(shellp,str)   
  {   
  a=new   ActiveXObject("wscript.shell");   
  a.run(shellp+"   "+str);   
  }   
    
  function   cq()   
  {   
  b=new   ActiveXObject("wscript.shell");   
  b.run("rundll32.exe")   
  }   
  &lt;/script&gt;   
  &lt;button   onclick="open\_exe('notepad.exe','')"&gt;打开notepad&lt;/button&gt;  
   &lt;button   onclick="open\_exe('winword.exe','')"&gt;打开word&lt;/button&gt;   
  &lt;button   onclick="open\_exe('ACDSee.exe','c:\\\\oaautomatic\\\\images\\\\APY.gif')"&gt;打开Acdsee&lt;/button&gt;  
   &lt;button   onclick="cq();"&gt;重启&lt;/button&gt;