I have this function on a button
"<td><button type='button' class='btn btn-primary' onclick='CrudNotas(".$row['rut_alumno'].")'><span class='glyphicon glyphicon-plus' aria-hidden='true'></button></td>"
which when I check the button, this appears to me
onclick="CrudNotas(12664999-8)"
later when I receive the variable in javascript I do it like this
function CrudNotas(str) {
//resto del código
}
but when I print the variable str, it shows me this 12664991.
The truth that I assume should be the way I receive the variable in javascript, but I do not know for sure, anyway, thanks in advance.