<script type="text/javascript"> var t1 = "fff"; var t2 = "<?php echo ""+t1+"";?>"; alert(t2); </script>