织梦dedecms会员中心调用出需要的循环文档

实现的办法比较简单,一句JS搞定:document.getElementById("testx").innerHTML="<h2>222222222222222</h2>";  

然后我们在其关联的模板htm文件 写入 <div id='testx'></div>

再扩展下,便可得
document.getElementById("Comment").innerHTML="<?php  $dsql->GetOne("select * from `archives` WHERE channel='3' order by id DESC limit 9"); 

$dsql->Execute('me');  

while ($row = $dsql->GetArray('me')){ if($row['flag'] == "c,p"){  $tj = "<i class='tj'></i>"; }else{$tj = ""; }  ?>
<li><a href='../plus/view.php?aid=<?php echo $row['id']; ?>' target='_blank' title='<?php echo $row['title']; ?>'>
<img src='<?php echo $row['litpic']; ?>' width='230' /><?php echo $tj; ?></a>
<span class='title' title='<?php echo $row['title']; ?>'><a href='../plus/view.php?aid=<?php echo $row['id']; ?>' target='_blank'>
<?php echo $row['title']; ?></a></span></li><?php  }  print_r($row);  ?>";

可以方便在织梦会员中心调用出需要的循环文档

内容版权声明:除非注明,否则皆为本站原创文章。

转载注明出处:https://www.heiqu.com/9d45edc63385782bca59fbc81b39ed3a.html