initial commit
This commit is contained in:
		
							
								
								
									
										28
									
								
								PHP_Scripts/JS_Keypress/keypress.html
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										28
									
								
								PHP_Scripts/JS_Keypress/keypress.html
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,28 @@
 | 
			
		||||
<html>
 | 
			
		||||
<head>
 | 
			
		||||
 <script language="JavaScript">
 | 
			
		||||
 function keyHandler(e)
 | 
			
		||||
 {
 | 
			
		||||
 	var pressedKey;
 | 
			
		||||
 	if (document.all)
 | 
			
		||||
	{
 | 
			
		||||
		e = window.event;
 | 
			
		||||
	}
 | 
			
		||||
 	if (document.layers || e.which)
 | 
			
		||||
	{
 | 
			
		||||
		pressedKey = e.which;
 | 
			
		||||
	}
 | 
			
		||||
 	if (document.all)
 | 
			
		||||
	{
 | 
			
		||||
		pressedKey = e.keyCode;
 | 
			
		||||
	}
 | 
			
		||||
 	pressedCharacter = String.fromCharCode(pressedKey);
 | 
			
		||||
 	alert(' Character = ' + pressedCharacter + ' [Decimal value = ' + pressedKey + ']');
 | 
			
		||||
 }
 | 
			
		||||
 document.onkeyup = keyHandler;
 | 
			
		||||
 </script>
 | 
			
		||||
 </head>
 | 
			
		||||
 <body>
 | 
			
		||||
 Press any key.
 | 
			
		||||
 </body>
 | 
			
		||||
 </html>
 | 
			
		||||
		Reference in New Issue
	
	Block a user