JavaScript Reference/Javascript Properties/shiftKey

Материал из Web эксперт
Перейти к: навигация, поиск

"shiftKey" Example

    
<html>
<body>
<script language="JavaScript">
function function1() {
    var x = event.shiftKey; 
    if (x == false) {
        y = "not pressed."
    } else {
        y = "pressed."
    }
    alert("The status of the Shift key is "+y);
} 
</script>
<a id="myL" 
    title="The wbex.ru home page" 
    href="http://www.wbex.ru/" 
    target=_blank
    onmouseover="function1()">
    unveil the status of the Shift key
</a>
</body>
</html>



"shiftKey" is applied to

+----------------+--------------------------------------------------------------+
| Applied_To     |event                                                         |
+----------------+--------------------------------------------------------------+



"shiftKey" Possible Values

Possible Values
true 
false.



"shiftKey" Syntax and Note

Note:
Read-only property. 
Is SHIFT key pressed. 
    
Syntax:
    
window.event.shiftKey