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

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

अवलोकन

altKey माउस इवेंट प्रॉपर्टी बताती है कि माउस क्लिक के समय ALT कुंजी दबाई गई थी या नहीं।

उदाहरण

<!DOCTYPE html> <html>    <body onmousedown="funcAltKey(event)">       <div>Press and hold ALT key and then click here.</div>       <script>          function funcAltKey(event) {             if (event.altKey) {                alert("ALT key: Pressed");             } else {                alert("ALT key: NOT Pressed");             }          }       </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 = "