- Forums
- react
- React Onclick Event Pass Event Details To Function Parameter From Button
This Page Contains information about React Onclick Event Pass Event Details To Function Parameter From Button By jackson in category react with 0 Replies. [5135], Last Updated: Mon Jun 24, 2024
jackson
Mon May 29, 2023
0 Comments
274 Visits
Very simple, to pass event details from a onclick button:
example:
<MDButton variant="gradient" color="success" fullWidth disabaled="false"
onClick={(e)=>searchSecurityCode(e)}>
Get Files
</MDButton>
const searchSecurityCode = (ev) => {
alert('you clicked');
console.log(`LINE 73 ev=`, ev);
//ev.preventDefault();
navigate('/upload');
};