Skip to content

Tag: html

Swipe Event on HTML

Im trying to make a swipe event , on page 1 its can be swipe to the page 2 , but from page 2 its not working , what is wrong here ? its only works on page 1 , what shall i do ? (Page mostly code , i need more char) Im trying to make a swipe event

Making a Button that outputs a greeting

I’m kinda new to programming and need help with integrating javascript and html. I am trying to make an html page that has a name input section and a submit button to give a greeting from the function in a javascript file. I’ve tried using the form and input tags and was wondering how i output to …

Separate onClick event for parent and child element

I have JSX code like this: When I click on parent (outside the child) it will run clickOnParent, and when I click the child it will run both clickOnParent and clickOnChild of course.Now I want to trigger only clickOnChild and ignore clickOnParent when clicking exactly on the child. How can I do? Answer Use Ev…

How can I add event listener to just button element

Here is my code. then we can find simple button in DOM. Once I click button, script returns or . How can I add event listener to just button element? Answer This is as one of the options… You can use the currentTarget. In your case, it will be like this:

Icon clicking to show the date

I am creating the input field to show the calendar date. Now I just only can click the input field to show the calendar date. Actually, I want to click the calendar icon to show the calendar date, then the calendar date will show in the input field, not click the input field to show the calendar. Hope someone…