Home > Web Front-end > JS Tutorial > javascript onmouseout solution_javascript skills

javascript onmouseout solution_javascript skills

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
Release: 2016-05-16 18:23:05
Original
1154 people have browsed it

onmouseout found that its triggering was too sensitive. When passing through the text chain in the layer, the onmousetout event was triggered, and the function could not be displayed normally. After some searching, I sorted it out for your reference.

1.

Copy code The code is as follows:


 

  faddsf 


2.
Copy code The code is as follows:

 var LeaveFunext = function(t,f){for(var p in f){t[p]=f[p]} return t};
var IE = 'v' == 'v';
var contains = function(wrap,child){
if(IE) return wrap.contains(child);
while(child && typeof( child.parentNode) != "undefind"){
 if(wrap == child) return true;
 child = child.parentNode;
}
return false;
 };
var LeaveFun = function(o){
var _o = typeof o == "string" ? document.getElementById(o) : o;
return this == window ? new LeaveFun(_o):LeaveFunext(_o , LeaveFun.prototype);
 };
LeaveFun.prototype = {
mouseleave : function(fn){
if(IE){
this.attachEvent('onmouseleave',fn) ;
 }else{
this.addEventListener('mouseout',function(e){
tar = e.relatedTarget;
if(!contains(this, tar)){
fn .call(this);
}
 }, false);
 }
  return this;
 }
 }; ').mouseleave(function(){document.getElementById('share_customerdiv').style.display ='none';})


3. The simplest, but it will be slightly different on some systems. Flashing.


More from this person...
Message Board
Friends



Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Latest Issues
Apakah pengumpulan sampah JavaScript?
From 1970-01-01 08:00:00
0
0
0
Apakah fungsi cangkuk JavaScript?
From 1970-01-01 08:00:00
0
0
0
JavaScript 후크 기능이란 무엇입니까?
From 1970-01-01 08:00:00
0
0
0
Was sind JavaScript-Hook-Funktionen?
From 1970-01-01 08:00:00
0
0
0
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template