JavaScript Reference/Javascript Properties/shiftKey

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

"shiftKey" Example

   <source lang="javascript">
   

<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>


     </source>
   
  


"shiftKey" is applied to

   <source lang="javascript">

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

     </source>
   
  


"shiftKey" Possible Values

   <source lang="javascript">

Possible Values true false.


     </source>
   
  


"shiftKey" Syntax and Note

   <source lang="javascript">

Note: Read-only property. Is SHIFT key pressed.

Syntax:

window.event.shiftKey


     </source>