This is my select field in html where I am passing the id and date which are stored in php variable to the js function by calling onchange event
<select id="student_id-'.$id.'-'.$date.'" onchange="fun3('.$id.','.$date.')" name = "roll">
<>option values=""></option>
..
</option>
</select>
Upto here I am getting $id and $date properly as($date = 2019-06-27)
and this is how I have created the fun3 function in js
function fun3(id,date) {
some code
}
when I tried to know if I am getting correct values in this function by alert() then I am getting id correctly but after alerting date I am getting value as 2014 ,instead of 2019-06-27
I don’t know why , what should I do to fix it ?