Is it possible to set a button’s onclick action to a javascript variable?
The idea is that we are controlling a table with javascript. Whenever one clicks on a row of that table, we update a javascript variable. That var would be the _GET var for the php script to be run.
Is it possible to set a button’s onclick action to a javascript variable? The
Share
Add this to the element you want to be clickable :
And then add this javascript function in a php file :