• event事件1


    var oDiv = document.getElementsByTagName("div")[0];
    //			oDiv.onclick = function(){
    //				alert(1);
    //			}
    //			oDiv.ondblclick = function(){
    //				alert(1);
    //			}
    //			oDiv.onclick = alt;
    //			function alt(){
    //				alert(1);
    //			}
    
    //			oDiv.onmousedown = function(){
    //				oDiv.style.background = "yellow";
    //			}
    //			oDiv.onmouseup = function(){
    //				oDiv.style.background = "green";
    //				alert(1);
    //			}
    //			oDiv.onclick = function(){
    //				oDiv.style.background = "black";
    //			}
    
    //			oDiv.onmouseover = function(){
    //				console.log(1);
    //			}
    //			oDiv.onmouseout = function(){
    //				console.log(2);
    //			}
    //			oDiv.onmousemove = function(){
    //				console.log(3);
    //			}
    			
    //			oDiv.onmousedown = function(){
    //				document.onmousemove = function(e){
    //					var e = event||window.event;
    //					var oLeft = e.clientX;
    //					var oTop = e.clientY;
    //					oDiv.style.left = oLeft + "px";
    //					oDiv.style.top = oTop + "px";
    //				}
    //				document.onmouseup = function(){
    //					document.onmousemove = null;
    //				}
    //			}
    
    //			document.onkeypress = function(e){
    //				var e = event||window.event;
    //				oDiv.innerHTML = e.keyCode;
    //			}
    //			
    //			document.onkeydown = function(){
    //				console.log(1);
    //			}
    //			
    //			document.onkeyup = function(){
    //				console.log(2);
    //			}
    
    //			window.onresize = function(){
    //				console.log(1);
    //			}
    
    //			window.oncontextmenu = function(){
    //				return false;
    //			}
    
    //			window.onscroll = function(){
    //				console.log(document.body.scrollTop);
    //			}
    			
    //			window.onscroll = function(){
    //				if(document.body.scrollTop>=800){
    //					oDiv.style.display = "block";
    //				}else{
    //					oDiv.style.display = "";
    //				}
    //			}
    

      

  • 相关阅读:
    BZOJ4076 : [Wf2014]Maze Reduction
    XVII Open Cup named after E.V. Pankratiev. Eastern GP, Division 1
    BZOJ4617 : [Wf2016]Spin Doctor
    BZOJ4613 : [Wf2016]Longest Rivers
    BZOJ2587 : [Ceoi2011]Team
    BZOJ4422 : [Cerc2015]Cow Confinement
    BZOJ4437 : [Cerc2015]Looping Labyrinth
    BZOJ4432 : [Cerc2015]Greenhouse Growth
    BZOJ2670 : Almost
    寻找“最好”(4)——不等约束和KKT条件
  • 原文地址:https://www.cnblogs.com/mingjixiaohui/p/5246752.html
Copyright © 2020-2023  润新知