invoke a javascript function through php -


this question has answer here:

i want invoke javascript function php, php script included before javascript.

<script type="text/javascript"> function myjsfunction(){ //js code } </script> 

slightly odd question...

if want call js function on page load add bottom of dom on page load page created php script... instance...

<script> window.onload = function() {   yourfunction(param1, param2); }; </script> 

Comments

Popular posts from this blog

google chrome - Developer tools - How to inspect the elements which are added momentarily (by JQuery)? -

angularjs - Showing an empty as first option in select tag -

php - Cloud9 cloud IDE and CakePHP -