织梦园模板网提供云优cms模板,pbootcms模板,Wordpress主题模板等各类企业新闻资讯网站模板下载服务。织梦园网站模板交流群
用户名:
密码:
注册
注册后享受折扣价

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

织梦园模板 / 2019-04-23 / 收藏

实现的办法比较简单,一句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);  ?>";

 

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

相关织梦教程

收缩