[Answer]-How can I use django template variable as an argument to call javascript function?

1👍

Try this,

<a href="#" class="btn btn-primary btn-sm" href="#" onclick="changeButton( '{{ request.session.variable }}' );return false;">Button</a>

‘{{ request.session.variable }}’

👤dhana

Leave a comment