Home > Backend Development > PHP Tutorial > 怎么实现循环

怎么实现循环

WBOY
Release: 2016-06-13 13:15:58
Original
1097 people have browsed it

如何实现循环?
我有段JS代码里面嵌了块php代码,我现在要js循环三十次,同时将循环变量i每次都传递到php代码中,要怎么弄?求助啊
<script><br />window.onload = function ()<br />{ for(i=0;i<30;i++)<br /> var readpoint = <?php<br /> if(id==i)<br /> 。<br /> 。<br /> ?><br /> .<br /> .<br /> .<br /> .<br />}<br><br /><font color='#e78608'>------解决方案--------------------<br /> 要门AJAX,要么打开30个新网页。除此别无他法。 <div class="clear"></script>

Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template