class Common
{
constructor(){
this.URL=location.protocol + '//' + location.host+'';
}
showOk(){
console.log('ok');
}
}
const commn=new Common();
Here is my html codes that I've tried to call the showOk() function.
<button type="button" class="btn btn-01 btn-checkout-login ml-auto w-100 text-center" onclick="return commn.showOk();" ;="">Continue Checkout</button>
<button type="button" class="btn btn-01 btn-checkout-login ml-auto w-100 text-center" onclick="commn.showOk();" ;="">Continue Checkout</button>