HTML -JavaScript--模拟病毒

来源:互联网 发布:土尔扈特部东归 知乎 编辑:程序博客网 时间:2024/05/28 19:24
/* *Copyright (c) 2017,烟台大学计算机学院 All rights reserved. *文件名称:关于HTML的练习*作    者:张晴晴 *完成日期:2017年11月11日 *版 本 号:v1.0  * *问题描述:HTML5-JavaScript*输入描述: 无*程序输出: 无*/ 
<!DOCTYPE HTML><html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"><title>模拟电脑病毒效果</title><script>  var t  function show(){ /*window.showModalDialog("warning.html","新打开的窗口","toolbars=0, location=0, statusbars=0, menubars=0,width=250,height=250,scrollbars=1");    */   window.open ('warning.html', '新打开的窗口', 'height=100, width=400, top=50,left=50, toolbar=no, menubar=no, scrollbars=no, resizable=no,location=no, status=no') t=setTimeout("show()",100);  }   function stop1() { clearTimeout(t); alert("恭喜你,中奖了!!!"); }  </script></head><body><input type="button" value="病毒警告" onClick="show()"><input type="button" value="停止弹出" onClick="stop1()"> </body></html>


原创粉丝点击