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

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

अवलोकन

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

उदाहरण

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