javascript - How to check what was clicked in jquery? -


I want to see what was clicked on the entire document and save this information to target variables .

I want to make some arguments with knowledge about the goal clicked.

Here is sample code:

  $ (document) .ready (function () {console.log ("document (event == last event) {event =" ";} =" ";" EVENT_NOTHING ";} If (event! = Previous event & amp; incident! =" EVENT_NOTHING ") {console.log (" EVENT: "+ event); // (...) Some arguments (...)} last event = Event;} Loop = set interval (loop, 100); // event $ (document) .Kiddown (function (e) {var key = e.which; if (key = Event = "EVENT_KEYPRESS_LEFTARROW"; if (key == "38") event = "EVENT_KEYPRESS_UPARROW"; and if (key == "39") event = "EVENT_KEYPRESS_RIGHTARROW"; and if (key == "40 ") Event =" EVENT_KEYPRESS_DOWNARROW "; other {d} No = "EVENT_KEYPRESS_UNBINDED";}} Click $ (document). (Function () {event = "EVENT_KEYPRESS_CLICK"; target = ??????? // For example an element in the canvas, or in html Also tagged}};});    

There is a target asset in the event

  $ (document). Click (function (e) {event = "EVENT_KEYPRESS_CLICK"; Target = e.target;});    

Comments

Popular posts from this blog

java - ImportError: No module named py4j.java_gateway -

python - Receiving "KeyError" after decoding json result from url -

.net - Creating a new Queue Manager and Queue in Websphere MQ (using C#) -