php变量赋值给js
$(document).ready(function(){ <?php $f="'name'"?> var t=<?php echo $f?>; alert(t) })
或
<script language="javascript" > var t=<?php echo '"sd"'?>; alert(t) </script>
$(document).ready(function(){ <?php $f="'name'"?> var t=<?php echo $f?>; alert(t) })
或
<script language="javascript" > var t=<?php echo '"sd"'?>; alert(t) </script>