Browse other questions tagged, Where developers & technologists share private knowledge with coworkers, Reach developers & technologists worldwide, how to use onclick event in html
, Speeding software innovation with low-code/no-code tools, Tips and tricks for succeeding as a developer emigrating to Japan (Ep. gets put in a box and stays there you don't do anything with it afterwards. Calculate difference between dates in hours with closest conditioned rows per group in R. t-test where one sample has zero variance? We can achieve this functionality very easily in React JS by using useRef. That object has many fields and methods, but the most important for us in this context is currentTarget field. That's just incorrect. Algorithm STEP 1 Create a select tag with multiple options and assign an id to the select tag. The onClick () event can be used with <select> tags - however, you probably are looking for functionality where it would be best to use the onChange () event, not onClick (). Stack Overflow for Teams is moving to its own domain! Online Demo: http://jsfiddle.net/thefourtheye/GP5HE/, Instead of the SPAN tags, you can use this, And the script has to be modified like this. by clicking + dragging across a text field) so can only be used with the and