Questions tagged as 'eventos'

4
answers

How to know which key was pressed

I need that every time a key is pressed, a function will be executed, which will vary depending on the key that was pressed. So I need to know what key was pressed. This is what I have so far: function onKeyDownHandler() { conso...
asked by 30.06.2017 / 16:30
3
answers

Difference between Bubbling and Capturing

What is the difference between event event bubbling and capturing? Which of the two is the most indicated to use? In which aspects is each of them more efficient? In which cases would we use each of them?     
asked by 28.09.2017 / 13:18
3
answers

Is it possible to know when all the event handlers are finished?

I want to know when all event handlers in an event in JavaScript are finished. Is that possible? Example: <button id='button' ...>Submit</button> <script> ultimo = notify() { alert("Último!"); }; $( '#butto...
asked by 03.01.2016 / 14:55
3
answers

Events "keypress" "keydown" "keyup"

I want a certain function to be executed when I press a key, whatever. But let it run once (at the moment you press it). I expected to do this with "keydown" but behaves the same "keypress" addEvent(document, "keypress", function (e) {...
asked by 30.06.2017 / 22:40
1
answer

How to do smooth scrolling towards an element

I am looking for a way to scroll towards an element with a smooth animation. For this I have helped with this site . function scroll() { const a = document.getElementById("p"); a.scrollIntoView({ behavior: "smooth...
asked by 21.07.2017 / 22:32
1
answer

How to trigger an event from one form in another

I am working with 2 forms, of which the first one acts as a floating box to collect data that is entered by the user. Once the data is entered, the user presses the Aplicar button to send the collected data to the second form, I want an e...
asked by 23.04.2018 / 07:30
2
answers

How do events in C # trigger?

Passing through EVENTS and DELEGATES in C #, I find the Click event in almost all the controls, I want to make a personalized event, I have tried to see the definition of the "CLICK" event. I understand that the next line invokes the delegate an...
asked by 11.07.2018 / 16:37
2
answers

Load select when selecting date

I have to load a select with different data, according to the date chosen, and I do not know how to achieve this. The only thing that occurred to me was to occupy onchange in the input where it is shown the time, but it does not...
asked by 08.11.2016 / 14:17
1
answer

Create addEventListener in a span whose id is contained in a variable

good morning. First of all I apologize for how unclear the title is, I have not been able to describe it better. Secondly, I clarify that what I am going to put here is an invented and simple example so that you understand what is my doubt and a...
asked by 21.02.2017 / 16:19
4
answers

How to know which mouse button was pressed

I want to know when a mouse button is pressed on the button , which was the pressed, if the left, right, or middle. The problem is that for the right click I get the typical menu. Nor does it detect if I press the middle one. How to detect...
asked by 20.07.2017 / 20:12