Computer >> कंप्यूटर ट्यूटोरियल >  >> प्रोग्रामिंग >> JavaScript

JavaScript में clientX माउस इवेंट की भूमिका क्या है?

अवलोकन

clientX माउस इवेंट प्रॉपर्टी माउस पॉइंटर का क्षैतिज निर्देशांक (वर्तमान विंडो के सापेक्ष) लौटाती है।

उदाहरण

<!DOCTYPE html> <html>    <body>       <p onclick = "coordsFunc(event)">          Click here to get the x (horizontal) and y (vertical) coordinates          (according to current window) of the mouse pointer.         </p>       <script>          function coordsFunc(event) {             var x_coord = event.clientX;             var y_coord = event.clientY;             var xycoords = "X coords= " + x_coord + ", Y coords= " + y_coord;             document.write(xycoords);          }       </script>    </body> </html>
  1. - JavaScript में screenY माउस इवेंट की भूमिका क्या है?

    अवलोकनscreenY माउस इवेंट प्रॉपर्टी माउस पॉइंटर का लंबवत निर्देशांक (स्क्रीन के सापेक्ष) लौटाती है।उदाहरण<!DOCTYPE html> <html>    <body>       <p onclick = "coordsFunc(event)">Click here to get the x (horizontal) and y (vertical) coordinates

  1. - JavaScript में screenX माउस इवेंट की भूमिका क्या है?

    अवलोकनscreenX माउस इवेंट प्रॉपर्टी माउस पॉइंटर का क्षैतिज निर्देशांक (स्क्रीन के सापेक्ष) लौटाती है।उदाहरण<!DOCTYPE html> <html>    <body>       <p onclick = "coordsFunc(event)">Click here to get the x (horizontal) and y (vertical) coordinat

  1. - JavaScript में कीबोर्ड इवेंट altKey प्रॉपर्टी की भूमिका क्या है?

    अवलोकनaltKey प्रॉपर्टी बताती है कि कीबोर्ड इवेंट ट्रिगर होने पर ALT कुंजी दबाई गई थी या नहीं।उदाहरण<!DOCTYPE html> <html>    <body>       <input type = "text" onkeydown = "funcAltKey(event)">       <div id = "