Sommario
Restituisce il nome dell'evento (case-insensitive).
Sintassi
stringa = event.type
Esempio
<html>
<head>
<title>esempio su event.type</title>
<script type="text/javascript">
var eventoCorrente = null;
function tipoEvento(evt) {
eventoCorrente = evt.type;
document.getElementById("Etype").firstChild.nodeValue = eventoCorrente;
}
</script>
</head>
<body
onkeydown="tipoEvento(event)"
onkeyup="tipoEvento(event)"
onmousedown="tipoEvento(event)"
onmouseup="tipoEvento(event)">
<p>Premi un tasto della tastiera o del mouse per visualizzare il nome dell'evento.</p>
<p>Tipo evento: <span id="Etype">-</span></p>
</body>
</html>
Note
Il è un nome XML valido.