Search notes:

DOM example: onkeydown__onkeyup

<html>
<head>

<title>Event: KeyDown and KeyUp</title>

<script type="text/JavaScript">
<!--

function print_out(txt, e) {

  if (!e) {
    e = window.event;
  }

  var k
  if (e.which) {
    k = e.which
  }
  else {
    k = e.keyCode
  }

  document.getElementById('out').innerHTML += txt + ": " + k + "<br>";
}

document.onkeydown = function(e) { print_out('Key Down', e); }
document.onkeyup   = function(e) { print_out('Key Up'  , e); }

//-->

</script>
</head>
<body>

  <div id='out'></div>

</body>
</html>
Github repository about-Document-Object-Model, path: /Events/onkeydown__onkeyup.html

See also

DOM examples

Index

Fatal error: Uncaught PDOException: SQLSTATE[HY000]: General error: 8 attempt to write a readonly database in /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php:78 Stack trace: #0 /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php(78): PDOStatement->execute(Array) #1 /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php(30): insert_webrequest_('/notes/developm...', 1759408132, '216.73.216.42', 'Mozilla/5.0 App...', NULL) #2 /home/httpd/vhosts/renenyffenegger.ch/httpsdocs/notes/development/web/DOM/examples/Events/onkeydown__onkeyup(75): insert_webrequest() #3 {main} thrown in /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php on line 78