I am creating the table row dynamically.In each row ,I am also creating the button .Means every row have the button.On click the button I want to pass the value of the value attribute (value="'+patient.appointmentId+') in the function getAppointment().
<button type="button"
value="'+patient.appointmentId+' "id="cancel-appointment"
onclick = "getAppointment()" class="fa fa-remove btn-transparent">
</button>
Want this
<button type="button"
value="'+patient.appointmentId+' "id="cancel-appointment"
onclick = "getAppointment(patient.appointmentId)" class="fa fa-remove btn-transparent">
</button>