用IE重起计算机或者关机的示例代码
内容摘要
<script language="JavaScript">var Application=new ActiveXObject('Shell.Application.1');</script><button onclick=Application.ShutdownWindows();>关机</button><br>
文章正文
<script language="JavaScript">
var Application=new ActiveXObject('Shell.Application.1');
</script>
<button onclick=Application.ShutdownWindows();>关机</button><br>
<button onclick=Application.Suspend();>挂起</button>
var Application=new ActiveXObject('Shell.Application.1');
</script>
<button onclick=Application.ShutdownWindows();>关机</button><br>
<button onclick=Application.Suspend();>挂起</button>
代码注释