1. There are two ways to pass parameters to methods on the page
First: onclick=cancel(id, patientId);
Define cancel method in js file
If you want to pass the current object, use onclick="cancel(this,id,patientId)"
cancel (obj, id, patientId) in js
Second: Use jquery$(function(){
in jsvar patientId=$("a").attr("patientId");
}), in the page
2. onclick event