Home >Backend Development >PHP Tutorial >请问我如何才能把这个alert(t2)打印出来呢?

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

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOriginal
2016-06-23 14:24:221451browse

<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> ++

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn