Home >Backend Development >PHP Tutorial >php向js函数传参的几种方法_PHP
<?php echo "<script>test('$_POST[userid]');</script> "; ?>
在上面的$_POST['']也可适用$_SESSION[' '];
<?php $para = "hello boby!"; echo $para; echo "<script> var para=\"$para\"; alert(para);</script>"; ?>;