zoukankan      html  css  js  c++  java
  • 重写Alert

    重写Alert

     1 <!DOCTYPE html>
     2 <html>
     3 <head>
     4 <meta charset="UTF-8">
     5 <title>Insert title here</title>
     6 <script type="text/javascript">
     7 var orginalert = window.alert;
     8 window.alert = function(message){
     9     var frm = document.frm;
    10     frm.action = "./popup.html";
    11     var winpop = window.open("","targetopoup","width=700,height=500,location=no,resizable=no");//top=0,left=0,
    12     frm.target = "targetopoup";
    13     frm.submit();
    14     frm.target = "";
    15     winpop.focus();
    16 }
    17 
    18 function originbuttonclick(){
    19     
    20     orginalert("orginalert");
    21 }
    22 function resetbuttonclick(){
    23     
    24     alert("orginalert");
    25 }
    26 </script>
    27 </head>
    28 <body>
    29 <input type="button" value="originbutton" onclick="originbuttonclick()"> 
    30 <input type="button" value="resetbutton" onclick="resetbuttonclick()"> 
    31 <form action="" id = "frm" name="frm">
    32 
    33 </form>
    34 </body>
    35 </html>
     1 <!DOCTYPE html>
     2 <html>
     3 <head>
     4 <meta charset="UTF-8">
     5 <title>Insert title here</title>
     6 <script type="text/javascript">
     7 function testload(){
     8     //alert("3434");
     9     window.moveTo(0,0);        
    10     window.resizeTo(screen.availWidth,screen.availHeight); 
    11     window.outerWidth=screen.availWidth;        
    12     window.outerHeight=screen.availHeight;
    13 }
    14 </script>
    15 </head>
    16 <body onload="testload()">
    17 <h1>hahah</h1>
    18 </body>
    19 </html>
  • 相关阅读:
    BIOS/MBR UEFI/GPT关系与区别-资料整理
    raid 简单了解
    MBR主引导记录
    linux 安装vscode
    chrome 获得点击按钮时的事件
    python计算纪念日相关
    python error: curl: (1) Protocol "'https" not supported or disabled in libcurl
    linux go with vscode
    postman 进阶技巧
    mysql常用时间函数与类型转换
  • 原文地址:https://www.cnblogs.com/mingluosunshan/p/5287703.html
Copyright © 2011-2022 走看看