0

How to create css copy function of button onclick by JavaScript?

I have to copy css of Button on onclick event. I have many button of different style.

25th Sep 2020, 5:57 AM
PRADEEP KHILLARE
PRADEEP KHILLARE - avatar
2 Answers
+ 2
Share your code in your thread Description. For code related questions, you may have better chance for answer when the post is accompanied with a code. Follow this guide to share your code link. https://www.sololearn.com/post/75089/?ref=app
25th Sep 2020, 6:17 AM
Ipang
+ 1
PRADEEP KHILLARE I assume you're somewhat familiar with Javascript and working with functions for handling events. If so, your click event handler function should receive an argument containing the event object. You can use this event object to access a property called event.currentTarget to reference the button that was clicked. Use this currentTarget property to access the CSS class and/or style values for the given button. Hopefully, this hint will help get you started. 😉👌
25th Sep 2020, 6:40 AM
David Carroll
David Carroll - avatar