js调用php
<?php $num=88; ?> <script> var a = <?php echo $num;?>; alert(a); </script>
php调用js
<?php $num = 88; echo "<script>alert( $num )</script>"; ?>
时间: 2024-10-27 13:52:48
<?php $num=88; ?> <script> var a = <?php echo $num;?>; alert(a); </script>
<?php $num = 88; echo "<script>alert( $num )</script>"; ?>