问题描述
如下<ahref="/team/buy2.php?id={$one['id']}&is_fox=<script>document.write(is_fox)</script>"class="en-btn"target="_blank">
得到结果:http://www.xxx.com/team/buy2.php?id=ZTNDczMg==&is_fox=<script>document.write(is_fox)</script>
而改成:<script>document.write("<ahref="/team/buy2.php?id={$one['id']}&is_fox="+is_fox+"class="en-btn"target="_blank">");</script>
可以输出了,但是得到结果:http://www.xxx.com/team/buy2.php?id=ZTNDczMg==&is_fox=0class=
都是错误的,我想得到http://www.xxx.com/team/buy2.php?id=ZTNDczMg==&is_fox=0怎么改
解决方案
解决方案二:
<script>document.write("<ahref="/team/buy2.php?id={$one['id']}&is_fox="+is_fox+""target="_blank">");</script>
解决方案三:
http://www.xxx.com/team/buy2.php?id=ZTNDczMg==&is_fox=<script>document.write(is_fox)</script><>()/在URL里面要用转义字符的
时间: 2024-09-21 00:35:00