Показать сообщение отдельно
  #2 (permalink)  
Старый 08.11.2010, 20:55
Аватар для ksa
ksa ksa вне форума
CacheVar
Отправить личное сообщение для ksa Посмотреть профиль Найти все сообщения от ksa
 
Регистрация: 19.08.2010
Сообщений: 14,121

javasc, пример из МСДН...

<HEAD>
<SCRIPT>
function checkKey()
{
if (window.event.shiftKey)  // checks whether the SHIFT key 
                            // is pressed
   {
   txtOutput.value = "true"; // returns TRUE if SHIFT is pressed 
                             // when the event fires
   }
}
</SCRIPT>
</HEAD>
<BODY>
<P>Press the SHIFT key while pressing another key.<BR>
    <INPUT TYPE=text NAME=txtEnterValue onkeypress="checkKey()">
<P>Indicates "true" if the shift key is used.<BR>
    <INPUT TYPE=text NAME=txtOutput>
</BODY>
Ответить с цитированием