I want to send a value to a javascript function when a button is clicked. The value comes from the database. How can I do it using laravel blade?
Here is my HTML code:
<a href="" onclick="add($res->driver_id);"><i class="fa fa-pencil-square-o"></i></a>
and my javascript:
<script>
function add(var id)
{
alert(id);
}
</script>
via Chebli Mohamed
Aucun commentaire:
Enregistrer un commentaire