determine which Element received an Event
Answer / Mr.amit Kumar
To determine which element received an event in JavaScript, you can attach an event listener to that element. Here's an example using the 'click' event:nn```javascriptnconst myElement = document.getElementById('my-element');nnmyElement.addEventListener('click', function(event) {n console.log('The clicked element is:', event.target);n});n```
| Is This Answer Correct ? | 0 Yes | 0 No |
write a code that user can choose/alter Body Text Size
how to pass data between pages using Frames
write a code to generate pseudorandom numbes
create a slide show
how to copy form data between different pages
validation code / function to allow only NUmbers in a text box
i am making a purchase sheet in html ,it contain names of product(by selecting checkboxes),quantity(textbox) and price(checbox), by using java script i am restricting the user to prevent them to enter the wrong data ,so i made the servlet were i am only able to prevent them to enter the page in empty field , so my doubt is how do you prevent them how to enter non numerical data in quantity field
Code for Adding Message and Confirmation Boxes Using JavaScript?
code to get the coordinates of a Click Event
communication between main window and new windows
how to get the User's Time of Day
how to delay a function call ?