首頁 >後端開發 >php教程 >请问我如何才能把这个alert(t2)打印出来呢?

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

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB原創
2016-06-23 14:24:221454瀏覽

<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