Event.type

Event.type - тип події.

Синтаксис:

Event.type;

Параметри:

Event - об'єкт Event.

Опис:

type властивість об'єкту Event яка містить рядок з типом події (назва).

Приклад:

Тест клік

document.getElementById("test").onclick=function(e){ alert( e.type ); } function myFunction(event){ event= event || window.event; alert(event.type); } document.onmousemove=myFunction;