Embark on a journey of knowledge! Take the quiz and earn valuable credits.
Take A QuizChallenge yourself and boost your learning! Start the quiz now to earn credits.
Take A QuizUnlock your potential! Begin the quiz, answer questions, and accumulate credits along the way.
Take A QuizWhen referring to a two and three-dimensional plane, a y-axis or vertical axis refers to the vertical height of a two or three-dimensional object. In the illustration, the y-axis plane moves up and down and INTERSECTS with the x-axis and z-axis.
An example of what uses the y-axis is a computer mouse. Moving the mouse up or down increases and decreases the y-axis value, allowing the computer to know where the mouse cursor is on the screen.
JavaScript y-axis mouse positionBelow is a JavaScript that shows you the mouse's x-axis and y-axis position as you move your mouse pointer in the screen area.
NoteIf you're on a smartphone or tablet, tap your finger to get position of the tap.
VAR mie = (navigator.appName == "Microsoft Internet Explorer") ? true : false; if (!mie) { document.captureEvents(Event.MOUSEMOVE); document.captureEvents(Event.MOUSEDOWN); } document.onmousemove = function (e) {mousePos(e);}; document.onmousedown = function (e) {mouseClicked();}; var mouseClick; var keyClicked; var mouseX = 0; var mouseY = 0; function mousePos (e) { if (!mie) { mouseX = e.pageX; mouseY = e.pageY; } else { mouseX = event.clientX + document.body.scrollLeft; mouseY = event.clientY + document.body.scrollTop; } document.show.mouseXField.value = mouseX; document.show.mouseYField.value = mouseY; return true; } Mouse x-axis position.
Mouse y-axis position.
Below are a few other examples of how the y-axis is used on a computer.
Turn Your Knowledge into Earnings.
Ever curious about what any word really means? Dictionary has got them all listed out for you to explore. Simply,Choose a subject/topic and get started on a self-paced learning journey in a world of word meanings and translations.
Write Your Comments or Explanations to Help Others