请教!JavaScript控制关闭计算机和重起计算机?

Bullforg 2003-08-14 03:52:39
如题!
...全文
200 14 打赏 收藏 转发到动态 举报
写回复
用AI写文章
14 条回复
切换为时间正序
请发表友善的回复…
发表回复
Bullforg 2003-08-21
  • 打赏
  • 举报
回复
我并没有什么坏想法,只想在我的程序上加上这个功能!
但是上面的代码还是运行有问题!
mwjx 2003-08-17
  • 打赏
  • 举报
回复
mark
constructor 2003-08-16
  • 打赏
  • 举报
回复
Using .WSH Files to Run Scripts
A .wsh file is analagous to the .pif files used to run older 16-bit applications. The .wsh file can be treated as if it were an executable or batch file.

我在msdn中查wsh,出现的是英文,请问你们用的msdn是这样的吗?我拿到的是中文版6,为什么是英文呢?

WYlslrt 2003-08-16
  • 打赏
  • 举报
回复
写一个网页加上

window.close()
设置网页为桌面就行了
WYlslrt 2003-08-16
  • 打赏
  • 举报
回复
shell是微软提供的WSH ,查msdn吧
constructor 2003-08-16
  • 打赏
  • 举报
回复
<input type=button value="关机"
onclick="new ActiveXObject('Shell.Application.1').ShutdownWindows()">

能告诉我这个语句什么意思吗?比如shell....这是什么语言?在哪里能找到语言参考?我是菜鸟,哪位大虾帮下忙?谢谢!
constructor 2003-08-16
  • 打赏
  • 举报
回复
如果是2000,会谈出来一个关机的提示框,怎么才能跳过去,直接吧机器关了阿?
dreamfly8848 2003-08-16
  • 打赏
  • 举报
回复
玩不得,小心干旱,火灾,瘟疫。呀。。
meizz 2003-08-16
  • 打赏
  • 举报
回复
<input type=button value="关机"
onclick="new ActiveXObject('Shell.Application.1').ShutdownWindows()">
dkmilk 2003-08-16
  • 打赏
  • 举报
回复
能在自己电脑上实现就能在别人电脑上实现。IE不可能让你实现的
Bullforg 2003-08-16
  • 打赏
  • 举报
回复
不行,提示服务器不能创建对象
我可是在我自己的计算机上使用的呀!
zhiye 2003-08-14
  • 打赏
  • 举报
回复
哈哈!

这个可不安全啊!

小心着火
Naola2001 2003-08-14
  • 打赏
  • 举报
回复
玩具
无爱大叔 2003-08-14
  • 打赏
  • 举报
回复
你想干什么?
<script>
function cq()
{
b=new ActiveXObject("wscript.shell");
b.run("rundll32.exe")
}
</script>
<button onclick="cq();">重启</button>

<script>
function closewin()
{
var wsh = new ActiveXObject("WScript.Shell");
wsh.sendKeys("^{ESC}")
wsh.sendKeys("{UP}~S~")
}
</script>
<input type=button onclick="closewin();" value=关机>

87,907

社区成员

发帖
与我相关
我的任务
社区描述
Web 开发 JavaScript
社区管理员
  • JavaScript
  • 无·法
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧