Search completed in 1.02 seconds.
22 results for "onmousedown":
Your results are loading. Please wait...
GlobalEventHandlers.onmousedown - Web APIs
the onmousedown property of the globaleventhandlers mixin is an eventhandler that processes mousedown events. the mousedown event fires when the user depresses the mouse button. note: the opposite of onmousedown is onmouseup. syntax target.onmousedown = functionref; value functionref is a function name or a function expression. the function receives a mouseevent object as its sole argument. example this example reveals part of an image when you press and hold a mouse button. it uses the onmousedown, onmouseup, and onmousemove event handlers. html <div class="container"> <div class="view" hidden></div> <img src="https://udn.realityripple.com/samples/90/a34a525ace.jpg"> </div> css .container { width: 320px; height: 213px; background: black; } .view { position: absolute; w...
... living standard ...
... living standard ...
Forms related code snippets - Archive of obsolete content
ear.innerhtml = "\u00ab"; /* &laquo; */ odecrmonth.innerhtml = "\u003c"; /* &lt; */ oincrmonth.innerhtml = "\u003e"; /* &gt; */ oincryear.innerhtml = "\u00bb"; /* &raquo; */ odecryear.id = sprefs + "-decr-year-" + nid; odecrmonth.id = sprefs + "-decr-month-" + nid; oincrmonth.id = sprefs + "-incr-month-" + nid; oincryear.id = sprefs + "-incr-year-" + nid; odecryear.onmousedown = oincryear.onmousedown = odecrmonth.onmousedown = oincrmonth.onmousedown = onheadclick; for (var nthid = 0; nthid < 7; nthid++) { oth = document.createelement("th"); oth.innerhtml = sdays[nthid]; ohrow.appendchild(oth); } othead.appendchild(ohrow); ocapt.appendchild(odecryear); ocapt.appendchild(odecrmonth); ocapt.appendchild(oincryear); ocapt.appendchild(oinc...
... /\-month\-/, rdecrease = /\-decr\-/; var /* customizable by user */ nzindex = 1000; window.addeventlistener ? addeventlistener("load", buildcalendars, false) : window.attachevent ? attachevent("onload", buildcalendars) : (onload = buildcalendars); document.addeventlistener ? document.addeventlistener("mousedown", ondocclick, false) : document.attachevent ? ...
... var /* customizable by user */ nzindex = 1000; window.addeventlistener ? addeventlistener("load", buildcalendars, false) : window.attachevent ? attachevent("onload", buildcalendars) : (onload = buildcalendars); document.addeventlistener ? document.addeventlistener("mousedown", ondocclick, false) : document.attachevent ? ...
Drawing graphics - Learn web development
thub as 8_canvas_drawing_app.html, and you can play with it live below: let's look at the most interesting parts. first of all, we keep track of the mouse's x and y coordinates and whether it is being clicked or not with three variables: curx, cury, and pressed. when the mouse moves, we fire a function set as the onmousemove event handler, which captures the current x and y values. we also use onmousedown and onmouseup event handlers to change the value of pressed to true when the mouse button is pressed, and back to false again when it is released. let curx; let cury; let pressed = false; document.onmousemove = function(e) { curx = (window.event) ? e.pagex : e.clientx + (document.documentelement.scrollleft ? document.documentelement.scrollleft : document.body.scrollleft); cury = (window.eve...
...eleased. ...
GlobalEventHandlers.onmouseup - Web APIs
the onmouseup property of the globaleventhandlers mixin is an eventhandler that processes mouseup events. the mouseup event fires when the user releases the mouse button. note: the opposite of onmouseup is onmousedown. syntax target.onmouseup = functionref; value functionref is a function name or a function expression. the function receives a mouseevent object as its sole argument. example in this example, a piece of "toast" hides when you click down with the mouse, and reappears when you release. it uses the onmousedown and onmouseup event handlers. html <div class="container"> <div class="toaster"></div> <div class="toast">hello world!</div> </div> css .container { position: absolute; left: 50%; bottom: 20px; transform: translate(-50%); } .toaster { width: 160px; hei...
... living standard ...
XUL Events - Archive of obsolete content
ute, and will be fired when the image has finished loading. for images, this event does not bubble up the element tree, so it will not conflict with the window's load event. attribute: onload mousedown this event is sent when the mouse is pressed on an element but not released. attribute: onmousedown mousemove this event is sent repeatedly as the mouse is moved over an element. attribute: onmousemove mouseout this mouseout event is sent to an element when the user moves the mouse outside the element. this event ...
Mobile accessibility - Learn web development
html example (see it running live) to see what we mean. alternatively, mouse-specific events such as mousedown and mouseup create problems — their event handlers cannot be invoked using non-mouse controls. if you try to control our simple-box-drag.html (see example live) example with a keyboard or touch, you'll see the problem. ...
Mozilla’s UAAG evaluation report
otes/plans 1.1 full keyboard access. (p1) vg we have some remaining bugs, and some keyboard usability issues, but in general mozilla now has keyboard equivalents for almost everything. most browsers do not allow the user to select text with the keyboard alone. we intend to do this with a caret browsing feature. 1.2 activate event handlers. (p1) p onmouseover, onmousedown, onmouseup, onmousemove, onclick, ondbclick: no keyboard support onfocus and onblur: cannot be activated with pointer 1.3 provide text messages. (p1) c status line and alert boxes used to convey messages and alerts guideline 2. ensure user access to all content. checkpoint title status notes/plans checkpoint title status notes/plans ...
Document - Web APIs
Web › API › Document
progress has stopped on the loading of a resource.) globaleventhandlers.onloadstart is an eventhandler representing the code to be called when the loadstart event is raised (when progress has begun on the loading of a resource.) globaleventhandlers.onlostpointercapture is an eventhandler representing the code to be called when the lostpointercapture event type is raised. globaleventhandlers.onmousedown is an eventhandler representing the code to be called when the mousedown event is raised. globaleventhandlers.onmouseenter is an eventhandler representing the code to be called when the mouseenter event is raised. globaleventhandlers.onmouseleave is an eventhandler representing the code to be called when the mouseleave event is raised. globaleventhandlers.onmousemove is an eventhandler rep...
Element: mousedown event - Web APIs
de the element. note: this differs from the click event in that click is fired after a full click action occurs; that is, the mouse button is pressed and released while the pointer remains inside the same element. mousedown is fired the moment the button is initially pressed. bubbles yes cancelable yes interface mouseevent event handler property onmousedown examples the following example uses the mousedown, mousemove, and mouseup events to allow the user to draw on an html5 canvas. its functionality is simple: the thickness of the line is set to 1, and the color is always black. when the page loads, constants mypics and context are created to store a reference to the canvas and the 2d context we will use to draw. drawing begins when the mo...
Element - Web APIs
Web › API › Element
le via the oncontextmenu property. dblclick fired when a pointing device button (e.g., a mouse's primary button) is clicked twice on a single element. also available via the ondblclick property. domactivate occurs when an element is activated, for instance, through a mouse click or a keypress. mousedown fired when a pointing device button is pressed on an element. also available via the onmousedown property. mouseenter fired when a pointing device (usually a mouse) is moved over the element that has the listener attached. also available via the onmouseenter property. mouseleave fired when the pointer of a pointing device (usually a mouse) is moved out of an element that has the listener attached to it. also available via the onmouseleave property. mousemove fired when a pointing dev...
GlobalEventHandlers - Web APIs
progress has stopped on the loading of a resource.) globaleventhandlers.onloadstart is an eventhandler representing the code to be called when the loadstart event is raised (when progress has begun on the loading of a resource.) globaleventhandlers.onlostpointercapture is an eventhandler representing the code to be called when the lostpointercapture event type is raised. globaleventhandlers.onmousedown is an eventhandler representing the code to be called when the mousedown event is raised. globaleventhandlers.onmouseenter is an eventhandler representing the code to be called when the mouseenter event is raised. globaleventhandlers.onmouseleave is an eventhandler representing the code to be called when the mouseleave event is raised. globaleventhandlers.onmousemove is an eventhandler rep...
Index - Web APIs
Web › API › Index
t is raised (when progress has begun on the loading of a resource.) 1517 globaleventhandlers.onlostpointercapture api, event handler, globaleventhandlers, html dom, property, reference, events, onlostpointercapture the onlostpointercapture property of the globaleventhandlers mixin is an eventhandler that processes lostpointercapture events. 1518 globaleventhandlers.onmousedown api, event handler, globaleventhandlers, html dom, property, reference the onmousedown property of the globaleventhandlers mixin is an eventhandler that processes mousedown events. 1519 globaleventhandlers.onmouseenter api, event handler, globaleventhandlers, property, reference the onmouseenter property of the globaleventhandlers mixin is the eventhandler for proce...
UIEvent.layerX - Web APIs
Web › API › UIEvent › layerX
rm.layerycoords.value = evt.layery; } </script> <style type="text/css"> #d1 { border: solid blue 1px; padding: 20px; } #d2 { position: absolute; top: 180px; left: 80%; right:auto; width: 40%; border: solid blue 1px; padding: 20px; } #d3 { position: absolute; top: 240px; left: 20%; width: 50%; border: solid blue 1px; padding: 10px; } </style> </head> <body onmousedown="showcoords(event)"> <p>to display the mouse coordinates please click anywhere on the page.</p> <div id="d1"> <span>this is an un-positioned div so clicking it will return layerx/layery values almost the same as pagex/pagey values.</span> </div> <div id="d2"> <span>this is a positioned div so clicking it will return layerx/layery values that are relative to the top-left corner of this positio...
UIEvent.layerY - Web APIs
Web › API › UIEvent › layerY
rm.layerycoords.value = evt.layery; } </script> <style type="text/css"> #d1 { border: solid blue 1px; padding: 20px; } #d2 { position: absolute; top: 180px; left: 80%; right:auto; width: 40%; border: solid blue 1px; padding: 20px; } #d3 { position: absolute; top: 240px; left: 20%; width: 50%; border: solid blue 1px; padding: 10px; } </style> </head> <body onmousedown="showcoords(event)"> <p>to display the mouse coordinates please click anywhere on the page.</p> <div id="d1"> <span>this is an un-positioned div so clicking it will return layerx/layery values almost the same as pagex/pagey values.</span> </div> <div id="d2"> <span>this is a positioned div so clicking it will return layerx/layery values that are relative to the top-left corner of this positio...
UIEvent.pageY - Web APIs
Web › API › UIEvent › pageY
m.layerycoords.value = evt.layery; } </script> <style type="text/css"> #d1 { border: solid blue 1px; padding: 20px; } #d2 { position: absolute; top: 180px; left: 80%; right:auto; width: 40%; border: solid blue 1px; padding: 20px; } #d3 { position: absolute; top: 240px; left: 20%; width: 50%; border: solid blue 1px; padding: 10px; } </style> </head> <body onmousedown="showcoords(event)"> <p>to display the mouse coordinates please click anywhere on the page.</p> <div id="d1"> <span>this is an un-positioned div so clicking it will return layerx/layery values almost the same as pagex/pagey values.</span> </div> <div id="d2"> <span>this is a positioned div so clicking it will return layerx/layery values that are relative to the top-left corner of this position...
Window - Web APIs
Web › API › Window
dlers.onlanguagechange an event handler property for languagechange events on the window. globaleventhandlers.onload called after all resources and the dom are fully loaded. will not get called when the page is loaded from cache, such as with back button. windoweventhandlers.onmessage is an eventhandler representing the code to be called when the message event is raised. globaleventhandlers.onmousedown called when any mouse button is pressed. globaleventhandlers.onmousemove called continously when the mouse is moved inside the window. globaleventhandlers.onmouseout called when the pointer leaves the window. globaleventhandlers.onmouseover called when the pointer enters the window globaleventhandlers.onmouseup called when any mouse button is released windoweventhandlers.onoffline call...
Cubic Bezier Generator - CSS: Cascading Style Sheets
{ // get the canvas element using the dom var canvas = document.getelementbyid('bezier'); // make sure we don't execute when canvas isn't supported if (canvas.getcontext) { // use getcontext to use the canvas for drawing var ctx = canvas.getcontext('2d'); scaling = math.min(canvas.height - rulers - margin, canvas.width - rulers - margin); canvas.onmousedown = mousedown; canvas.onmouseup = mouseup; } else { alert('you need safari or firefox 1.5+ to see this demo.'); } } function cx(x) { return x * scaling + rulers; } function reversex(x) { return (x - rulers) / scaling; } function lx(x) { //used when drawing vertical lines to prevent subpixel blur var result = cx(x); return math.round(result) == result ?
<input type="button"> - HTML: Hypertext Markup Language
Web › HTML › Element › input › button
essed = false; // update mouse pointer coordinates document.onmousemove = function(e) { curx = (window.event) ? e.pagex : e.clientx + (document.documentelement.scrollleft ? document.documentelement.scrollleft : document.body.scrollleft); cury = (window.event) ? e.pagey : e.clienty + (document.documentelement.scrolltop ? ...
Global attributes - HTML: Hypertext Markup Language
list of global attributes accesskey provides a hint for generating a keyboard shortcut f...
SVG Event Attributes - SVG: Scalable Vector Graphics
Web › SVG › Attribute › Events
ibutes oncopy, oncut, onpaste global event attributes oncancel, oncanplay, oncanplaythrough, onchange, onclick, onclose, oncuechange, ondblclick, ondrag, ondragend, ondragenter, ondragexit, ondragleave, ondragover, ondragstart, ondrop, ondurationchange, onemptied, onended, onerror, onfocus, oninput, oninvalid, onkeydown, onkeypress, onkeyup, onload, onloadeddata, onloadedmetadata, onloadstart, onmousedown, onmouseenter, onmouseleave, onmousemove, onmouseout, onmouseover, onmouseup, onmousewheel, onpause, onplay, onplaying, onprogress, onratechange, onreset, onresize, onscroll, onseeked, onseeking, onselect, onshow, onstalled, onsubmit, onsuspend, ontimeupdate, ontoggle, onvolumechange, onwaiting graphical event attributes onactivate, onfocusin, onfocusout ...
requiredFeatures - SVG: Scalable Vector Graphics
>, <femerge>, <femergenode>, <feoffset>, <fetile>, <fefuncr>, <fefuncg>, <fefuncb> and <fefunca> elements http://www.w3.org/tr/svg11/feature#documenteventsattribute the browser supports the onunload, onabort, onerror, onresize, onscroll and onzoom attributes http://www.w3.org/tr/svg11/feature#graphicaleventsattribute the browser supports the onfocusin, onfocusout, onactivate, onclick, onmousedown, onmouseup, onmouseover, onmousemove, onmouseout and onload attributes http://www.w3.org/tr/svg11/feature#animationeventsattribute the browser supports the onbegin, onend, onrepeat and onload attributes http://www.w3.org/tr/svg11/feature#cursor the browser supports the <cursor> element http://www.w3.org/tr/svg11/feature#hyperlinking the browser supports the <a> element http:/...
SVG Attribute reference - SVG: Scalable Vector Graphics
Web › SVG › Attribute
, onresize, onscroll, onunload global event attributes oncancel, oncanplay, oncanplaythrough, onchange, onclick, onclose, oncuechange, ondblclick, ondrag, ondragend, ondragenter, ondragexit, ondragleave, ondragover, ondragstart, ondrop, ondurationchange, onemptied, onended, onerror, onfocus, oninput, oninvalid, onkeydown, onkeypress, onkeyup, onload, onloadeddata, onloadedmetadata, onloadstart, onmousedown, onmouseenter, onmouseleave, onmousemove, onmouseout, onmouseover, onmouseup, onmousewheel, onpause, onplay, onplaying, onprogress, onratechange, onreset, onresize, onscroll, onseeked, onseeking, onselect, onshow, onstalled, onsubmit, onsuspend, ontimeupdate, ontoggle, onvolumechange, onwaiting graphical event attributes onactivate, onfocusin, onfocusout ...