JSFiddle - React, Tailwind, and code Playground

HTML

<a href='JavaScript:SWESubmitForm(document.SWEForm9_0,s_12,"s_9_1_35_1","1-3ZR4-1743")'  tabindex=997  id='s_9_1_35_1'>Add</a>

<a href='JavaScript:SWESubmitForm(document.SWEForm9_0,s_13,"s_9_1_36_1","1-3ZR4-1743")'  tabindex=997  id='s_9_1_36_1'>Cancel</a>

JavaScript

$('a[href*="SWESubmitForm"]').click(function(){
if($(this).text() == "Add"){
//do something
    alert('ok')}
});