JavaScript Reference/Javascript Properties/ctrlKey

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

"ctrlKey" Example

    
<html>
<body>
<input type="button" 
       value="Click this button while pressing either Ctrl key" 
       onClick="alert(event.ctrlKey);"> 
</body>
</html>



"ctrlKey" is applied to

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



"ctrlKey" Possible Values

Possible Values
true 
false.



"ctrlKey" Syntax and Note

Note:
Read-only property. 
Was CTRL key pressed. 
    
Syntax:
    
window.event.ctrlKey