4c4 < HTML Mouse Events - RJM Programming - May, 2019 --- > HTML onmouseout and onmouseleave and onmouseup and onmousedown Events - RJM Programming - May, 2019 7,20d6 < < 23,38d8 < < //onclick script Fires on a mouse click on the element < //onmousedown script Fires when a mouse button is pressed down on an element < //onmouseout script Fires when the mouse pointer moves out of an element < //onmouseup script Fires when a mouse button is released over an element < < //ondblclick script Fires on a mouse double-click on the element < //onmousemove script Fires when the mouse pointer is moving while it is over an element < //onmouseover script Fires when the mouse pointer moves over an element < //onwheel script Deprecated. Use the onwheel attribute instead onwheel < < var h4ihomdb=''; < var h4ihommo=''; < var h4ihomov=''; < var h4ihomwh=''; < 52,78d21 < h4ihomdb=''; < h4ihommo=''; < h4ihomov=''; < h4ihomwh=''; < } < < < function oclkomdb(ois) { < var oistype=''; < if (ois) { < if (('' + ois.id) != '') { < //setTimeout(btn, 1500); < if (('' + ois.type).toLowerCase().indexOf('undefined') != -1) { < oistype=ois.outerHTML.substring(1).split('>')[0].split(' ')[0]; < } else { < oistype=ois.type; < } < if (h4ihomdb == '') { < h4ihomudb='You ondblclick a ' + colourcode(oistype) + ' (' + ois.id + ')'; < } else if (h4ihomdb.indexOf('You ondblclick a ' + colourcode(oistype) + ' (' + ois.id + ')') != -1) { < h4ihomdb='You ondblclick a ' + colourcode(oistype) + ' (' + ois.id + ')'; < } else { < h4ihomdb+=' -> ' + 'You ondblclick a ' + colourcode(oistype) + ' (' + ois.id + ')'; < } < document.getElementById('myh4omdb').innerHTML=h4ihomdb; < } < } 81,127d23 < function oclkommo(ois) { < var oistype=''; < if (ois) { < if (('' + ois.id) != '') { < //setTimeout(btn, 1500); < if (('' + ois.type).toLowerCase().indexOf('undefined') != -1) { < oistype=ois.outerHTML.substring(1).split('>')[0].split(' ')[0]; < } else { < oistype=ois.type; < } < if (h4ihommo == '') { < h4ihomumo='You onmousemove a ' + colourcode(oistype) + ' (' + ois.id + ')'; < } else if (h4ihommo.indexOf('You onmousemove a ' + colourcode(oistype) + ' (' + ois.id + ')') != -1) { < h4ihommo='You onmousemove a ' + colourcode(oistype) + ' (' + ois.id + ')'; < } else { < h4ihommo+=' -> ' + 'You onmousemove a ' + colourcode(oistype) + ' (' + ois.id + ')'; < } < document.getElementById('myh4ommo').innerHTML=h4ihommo; < } < } < } < < function oclkomov(ois) { < var oistype=''; < if (ois) { < if (('' + ois.id) != '') { < //setTimeout(btn, 1500); < if (('' + ois.type).toLowerCase().indexOf('undefined') != -1) { < oistype=ois.outerHTML.substring(1).split('>')[0].split(' ')[0]; < } else { < oistype=ois.type; < } < if (oistype != 'span') { < if (h4ihomov == '') { < h4ihomov='You onmouseover a ' + colourcode(oistype) + ' (' + ois.id + ')'; < //} else if (('' + (document.getElementById('myh4omov').innerText || document.getElementById('myh4omov').contentWindow || document.getElementById('myh4omov').contentDocument)).indexOf('You onmouseover a ' + oistype + ' (' + ois.id + ')') != -1) { < } else if (h4ihomov.length > 800) { //h4ihomov.indexOf('You onmouseover a ' + colourcode(oistype) + ' (' + ois.id + ')') != -1) { < h4ihomov='You onmouseover a ' + colourcode(oistype) + ' (' + ois.id + ')'; < } else { < //alert(('' + (document.getElementById('myh4omov').innerText || document.getElementById('myh4omov').contentWindow || document.getElementById('myh4omov').contentDocument)) + ' ... versus ... ' + ('' + (document.getElementById('myh4omov').innerText || document.getElementById('myh4omov').contentWindow || document.getElementById('myh4omov').contentDocument)) + ' -> ' + 'You onmouseover a ' + oistype + ' (' + ois.id + ')'); < h4ihomov+=' -> ' + 'You onmouseover a ' + colourcode(oistype) + ' (' + ois.id + ')'; < } < document.getElementById('myh4omov').innerHTML=h4ihomov; < } < } < } < } 129,150d24 < function oclkomwh(ois) { < var oistype=''; < if (ois) { < if (('' + ois.id) != '') { < //setTimeout(btn, 1500); < if (('' + ois.type).toLowerCase().indexOf('undefined') != -1) { < oistype=ois.outerHTML.substring(1).split('>')[0].split(' ')[0]; < } else { < oistype=ois.type; < } < if (h4ihomwh == '') { < h4ihomuwh='You onwheel a ' + colourcode(oistype) + ' (' + ois.id + ')'; < } else if (h4ihomwh.indexOf('You onwheel a ' + colourcode(oistype) + ' (' + ois.id + ')') != -1) { < h4ihomwh='You onwheel a ' + colourcode(oistype) + ' (' + ois.id + ')'; < } else { < h4ihomwh+=' -> ' + 'You onwheel a ' + colourcode(oistype) + ' (' + ois.id + ')'; < } < document.getElementById('myh4omwh').innerHTML=h4ihomwh; < } < } < } < 162,164c36,38 < h4ihomu='You onmouseup a ' + colourcode(oistype) + ' (' + ois.id + ')'; < } else if (h4ihomu.indexOf('You onmouseup a ' + colourcode(oistype) + ' (' + ois.id + ')') != -1) { < h4ihomu='You onmouseup a ' + colourcode(oistype) + ' (' + ois.id + ')'; --- > h4ihomu='You onmouseup a ' + oistype + ' (' + ois.id + ')'; > } else if (h4ihomu.indexOf('You onmouseup a ' + oistype + ' (' + ois.id + ')') != -1) { > h4ihomu='You onmouseup a ' + oistype + ' (' + ois.id + ')'; 166c40 < h4ihomu+=' -> ' + 'You onmouseup a ' + colourcode(oistype) + ' (' + ois.id + ')'; --- > h4ihomu+=' -> ' + 'You onmouseup a ' + oistype + ' (' + ois.id + ')'; 184,186c58,60 < h4ihomd='You onmousedown a ' + colourcode(oistype) + ' (' + ois.id + ')'; < } else if (h4ihomd.indexOf('You onmousedown a ' + colourcode(oistype) + ' (' + ois.id + ')') != -1) { < h4ihomd='You onmousedown a ' + colourcode(oistype) + ' (' + ois.id + ')'; --- > h4ihomd='You onmousedown a ' + oistype + ' (' + ois.id + ')'; > } else if (h4ihomd.indexOf('You onmousedown a ' + oistype + ' (' + ois.id + ')') != -1) { > h4ihomd='You onmousedown a ' + oistype + ' (' + ois.id + ')'; 188c62 < h4ihomd+=' -> ' + 'You onmousdown a ' + colourcode(oistype) + ' (' + ois.id + ')'; --- > h4ihomd+=' -> ' + 'You onmousdown a ' + oistype + ' (' + ois.id + ')'; 206,208c80,82 < h4ihomo='You onmouseout a ' + colourcode(oistype) + ' (' + ois.id + ')'; < } else if (nospan(h4ihomo).indexOf(nospan('You onmouseout a ' + colourcode(oistype) + ' (' + ois.id + ')')) != -1) { < h4ihomo='You onmouseout a ' + colourcode(oistype) + ' (' + ois.id + ')'; --- > h4ihomo='You onmouseout a ' + oistype + ' (' + ois.id + ')'; > } else if (h4ihomo.indexOf('You onmouseout a ' + oistype + ' (' + ois.id + ')') != -1) { > h4ihomo='You onmouseout a ' + oistype + ' (' + ois.id + ')'; 210c84 < h4ihomo+=' -> ' + 'You onmouseout a ' + colourcode(oistype) + ' (' + ois.id + ')'; --- > h4ihomo+=' -> ' + 'You onmouseout a ' + oistype + ' (' + ois.id + ')'; 228,230c102,104 < h4ihoml='You onmouseleave a ' + colourcode(oistype) + ' (' + ois.id + ')'; < } else if (h4ihoml.indexOf('You onmouseleave a ' + colourcode(oistype) + ' (' + ois.id + ')') != -1) { < h4ihoml='You onmousleave a ' + colourcode(oistype) + ' (' + ois.id + ')'; --- > h4ihoml='You onmouseleave a ' + oistype + ' (' + ois.id + ')'; > } else if (h4ihoml.indexOf('You onmouseleave a ' + oistype + ' (' + ois.id + ')') != -1) { > h4ihoml='You onmousleave a ' + oistype + ' (' + ois.id + ')'; 232c106 < h4ihoml+=' -> ' + 'You onmouseleave a ' + colourcode(oistype) + ' (' + ois.id + ')'; --- > h4ihoml+=' -> ' + 'You onmouseleave a ' + oistype + ' (' + ois.id + ')'; 250c124 < h4ih='You clicked a ' + colourcode(oistype) + ' (' + ois.id + ')'; --- > h4ih='You clicked a ' + oistype + ' (' + ois.id + ')'; 252c126 < h4ih+=' -> ' + 'You clicked a ' + colourcode(oistype) + ' (' + ois.id + ')'; --- > h4ih+=' -> ' + 'You clicked a ' + oistype + ' (' + ois.id + ')'; 266,272d139 < function nospan(stuff) { < } < < function colourcode(inty) { < return '' + inty + ''; < } < 277c144 <

HTML Mouse Events

--- >

HTML onmouseout and onmouseleave and onmouseup and onmousedown Events

280,283c147,156 < < < < --- >

>

>

>

>

> >
stopPropagationpreventDefault
> > > 286,292c159,165 < < < > >
stopPropagationpreventDefault
<
<
< < --- >
> >
> > 294,298c167,171 <
< <
<  preventDefault < --- >
> >
>  preventDefault > 304,314d176 < <

<

<

<

<

< <

<

<

<