+ 1
How am i suppose to combine js with php
Whats the most correct way to do this? and does php have built in functions like that of onclick for js? because its pretty irritating having to combine php with js just so i can use the onclick function.
4 Réponses
+ 2
Check out AJAX
https://developer.mozilla.org/en-US/docs/Web/Guide/AJAX
0
Are you using php as an api? because if so you should look into this javascript library called axios. it allows you to make http requests which is normally how you interact with an api. I would also look into javascripts fetch function. I believe it is built in.
0
Thanks for the replies guys
- 1
i really dont know bcs they both are script lang.