Answers for "using js to call php"

PHP
1

php to call javascript function

echo '<script type="text/javascript">',
     'jsfunction();',
     '</script>'
;
Posted by: Guest on October-03-2021
-2

how to call js function from php

<?php
 if(your condition){
     echo "<script> window.onload = function() {
     yourJavascriptFunction(param1, param2);
 }; </script>";
?>
Posted by: Guest on June-08-2020

Browse Popular Code Answers by Language