首页 >后端开发 >php教程 >请问我如何才能把这个alert(t2)打印出来呢?

请问我如何才能把这个alert(t2)打印出来呢?

WBOY
WBOY原创
2016-06-23 14:24:221428浏览

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


请问我如何才能把这个alert(t2)打印出来呢?


回复讨论(解决方案)

<script> <br /> var t1 = "fff"; <br /> var t2 = "<?php t1 = "fff"; echo t1;?>"; <br /> alert(t2); <br /> </script>

<script> <br /> var t2 = "<?php echo 'fff';?>"; <br /> alert(t2); <br /> </script>

<script> <br /> var t1 = "fff"; <br /> var t2 = "<?php t1 = "fff"; echo t1;?>"; <br /> alert(t2); <br /> </script>

var t2 = "";

<script> <br /> var t1 = "fff"; <br /> var t2 = "<?php t1 = "fff"; echo t1;?>"; <br /> alert(t2); <br /> </script>
其实t1就是我用js函数获取的值,只是在这里我简写了


<script> <br /> var t1 = "fff"; <br /> var t2 = "<?php t1 = "fff"; echo t1;?>"; <br /> alert(t2); <br /> </script>

var t2 = "";
其实t1就是我用js函数获取的值,只是在这里我简写了





var t2 = "";
其实t1就是我用js函数获取的值,只是在这里我简写了 >




<script> <br /> var t1 = "fff"; <br /> var t2 = "<?php echo t1;?>"; <br /> alert(t1); <br /> </script>





<script> <br /> var t1 = "fff"; <br /> var t2 = "<?php echo t1;?>"; <br /> alert(t1); <br /> </script>






var t2 = "";
其实t1就是我用js函数获取的值,只是在这里我简写了 >




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

声明:
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系admin@php.cn