云主机测评网云主机测评网云主机测评网

云主机测评网
www.yunzhuji.net

初探织梦模板奥秘,第四篇章疑问重重,你准备好了吗?

# 织梦模板入门教程(四)

## 目录

1. 模板文件结构解析

2. 模板变量与标签的使用

3. 模板继承与布局

4. 模板样式调整

5. 模板优化与性能提升

6. 常见问题解答

## 1. 模板文件结构解析

织梦模板由多个文件组成,主要包括以下几部分:

`index.html`:首页模板文件。

`list.html`:列表页模板文件。

`show.html`:内容页模板文件。

`search.html`:搜索页模板文件。

`header.html`:头部模板文件。

`footer.html`:底部模板文件。

`style.css`:样式表文件。

`images/`:图片文件夹。

了解模板文件结构有助于快速定位问题,进行模板修改。

## 2. 模板变量与标签的使用

织梦模板支持丰富的变量和标签,以下是一些常用示例:

### 变量

`{channel_title}`:当前栏目标题。

`{page_title}`:当前页面标题。

`{content}`:当前内容。

### 标签

`{dede:field.title/}`:输出当前内容的标题。

`{dede:field.body/}`:输出当前内容的主内容。

`{dede:arclist}`:输出列表内容。

使用变量和标签时,注意遵循模板语法规则。

## 3. 模板继承与布局

织梦模板支持继承,可以将头部、底部等公共部分定义在父模板中,子模板继承父模板的公共部分,从而提高模板编写效率。

### 父模板

“`html

{dede:global.title/}

{dede:include file=”header.html” /}

{dede:include file=”content.html” /}

{dede:include file=”footer.html” /}

“`

### 子模板

“`html

{dede:include file=”header.html” /}

{dede:arclist}

{dede:field.title/}

{dede:field.body/}

{/dede:arclist}

{dede:include file=”footer.html” /}

“`

使用模板继承,可以快速搭建网站布局。

## 4. 模板样式调整

模板样式主要通过 `style.css` 文件进行调整,以下是一些常用样式调整方法:

背景颜色:`body { backgroundcolor: #fff; }`

文字颜色:`p { color: #333; }`

字体大小:`h1 { fontsize: 24px; }`

段落间距:`p { lineheight: 1.6; }`

根据网站需求,对样式进行调整。

## 5. 模板优化与性能提升

压缩CSS和JavaScript文件,减少加载时间。

使用CDN加速静态资源加载。

减少DOM操作,提高页面渲染速度。

使用懒加载技术,加载图片和视频。

优化模板,提高网站性能。

## 6. 常见问题解答

**Q:如何修改模板标题?

A:在父模板的 `

` 标签中修改 `{dede:global.title/}` 变量。 <p>**Q:如何修改模板背景颜色?</p> <p>A:在 `style.css` 文件中修改 `body` 选择器的 `backgroundcolor` 属性。</p> <p>**Q:如何修改模板字体?</p> <p>A:在 `style.css` 文件中修改 `body` 选择器的 `fontfamily` 属性。</p> <p>是织梦模板入门教程的第四部分,希望对您有所帮助,如有其他问题,请随时提问。</p></article> <div class="post-actions"> <a href="javascript:;" class="action action-rewards" data-event="rewards"><i class="tbfa"></i> 打赏</a> </div> <div class="post-copyright-custom">版权声明:主机测评不销售、不代购、不提供任何支持,仅分享信息/测评(有时效性),自行辨别,请遵纪守法文明上网。 <br>文章名称:《初探织梦模板奥秘,第四篇章疑问重重,你准备好了吗?》 <br>文章链接:<a href="https://www.yunzhuji.net/yunfuwuqi/241512.html">https://www.yunzhuji.net/yunfuwuqi/241512.html</a> </div> <div class="article-tags"> <a href="https://www.yunzhuji.net/tag/3_%E5%87%86%E5%A4%87%E5%B7%A5%E4%BD%9C/" rel="tag">准备工作</a> <a href="https://www.yunzhuji.net/tag/3_%E7%96%91%E9%97%AE%E9%87%8D%E9%87%8D/" rel="tag">疑问重重</a> <a href="https://www.yunzhuji.net/tag/3_%E7%BB%87%E6%A2%A6%E6%A8%A1%E6%9D%BF/" rel="tag">织梦模板</a> </div> <nav class="article-nav"> <span class="article-nav-prev">上一篇<br><a href="https://www.yunzhuji.net/yunfuwuqi/241511.html" rel="prev">寻找经济实惠的美国VPS服务,有哪些推荐?</a></span> <span class="article-nav-next">下一篇<br><a href="https://www.yunzhuji.net/yunfuwuqi/241513.html" rel="next">如何巧妙运用策略大幅提升随机增加文章点击数的效果?</a></span> </nav> <div class="relates relates-imagetext"> <div class="title"> <h3>相关推荐</h3> </div> <ul> <li><a href="https://www.yunzhuji.net/xunizhuji/288019.html"><img data-src="/pic/11_288019.jpg" alt="如何准备MySQL数据库连接的驱动?" src="/view/hfdr_dux/img/jz.png" class="thumb"></a><a href="https://www.yunzhuji.net/xunizhuji/288019.html">如何准备MySQL数据库连接的驱动?</a></li> <li><a href="https://www.yunzhuji.net/yunfuwuqi/273393.html"><img data-src="/pic/10_273393.jpg" alt="服务器维护期间,我们应该如何做好准备?" src="/view/hfdr_dux/img/jz.png" class="thumb"></a><a href="https://www.yunzhuji.net/yunfuwuqi/273393.html">服务器维护期间,我们应该如何做好准备?</a></li> <li><a href="https://www.yunzhuji.net/xunizhuji/256990.html"><img data-src="/pic/11_256990.jpg" alt="如何构建高效的MySQL灾备中心?RDS for MySQL实例的准备工作有哪些关键步骤?" src="/view/hfdr_dux/img/jz.png" class="thumb"></a><a href="https://www.yunzhuji.net/xunizhuji/256990.html">如何构建高效的MySQL灾备中心?RDS for MySQL实例的准备工作有哪些关键步骤?</a></li> <li><a href="https://www.yunzhuji.net/yunfuwuqi/241628.html"><img data-src="/pic/10_241628.jpg" alt="学习织梦模板从入门到精通,第六课,你准备好了吗?" src="/view/hfdr_dux/img/jz.png" class="thumb"></a><a href="https://www.yunzhuji.net/yunfuwuqi/241628.html">学习织梦模板从入门到精通,第六课,你准备好了吗?</a></li> <li><a href="https://www.yunzhuji.net/vps/81.html"><img data-src="/upload/article/20250129/231211679a454bc5e8a7arFI0.jpg" alt="colocrossing:中国新年特别促销,$12.99/年-1G内存/1核/20gSSD/10T流量/1Gbps,洛杉矶/纽约/爱尔兰" src="/view/hfdr_dux/img/jz.png" class="thumb"></a><a href="https://www.yunzhuji.net/vps/81.html">colocrossing:中国新年特别促销,$12.99/年-1G内存/1核/20gSSD/10T流量/1Gbps,洛杉矶/纽约/爱尔兰</a></li> <li><a href="https://www.yunzhuji.net/vps/96.html"><img data-src="/upload/article/20250205/19591867a3529646a4dDRZTdi.jpg" alt="itldc:全场VPS季付6折,€6.48/季,不限流量,新加坡/美国/欧洲等17个数据中心" src="/view/hfdr_dux/img/jz.png" class="thumb"></a><a href="https://www.yunzhuji.net/vps/96.html">itldc:全场VPS季付6折,€6.48/季,不限流量,新加坡/美国/欧洲等17个数据中心</a></li> <li><a href="https://www.yunzhuji.net/vps/112.html"><img data-src="/upload/article/20250214/21300267af455acefc5YHbaJ9.jpg" alt="CSTserver:香港/圣何塞/洛杉矶机房,上云仅需$9.9/年,裸金属$17.99/月,独服$39.99/月" src="/view/hfdr_dux/img/jz.png" class="thumb"></a><a href="https://www.yunzhuji.net/vps/112.html">CSTserver:香港/圣何塞/洛杉矶机房,上云仅需$9.9/年,裸金属$17.99/月,独服$39.99/月</a></li> <li><a href="https://www.yunzhuji.net/vps/53.html"><img data-src="/upload/article/20250105/204644677a7f34b83d2Bo0rmZ.jpg" alt="lcayun/莱卡云:云服务器29.99元起/独服450元起,香港CN2/韩国优化&双ISP/美国优化/镇江/宁波/成都/枣庄/扬州/绍兴" src="/view/hfdr_dux/img/jz.png" class="thumb"></a><a href="https://www.yunzhuji.net/vps/53.html">lcayun/莱卡云:云服务器29.99元起/独服450元起,香港CN2/韩国优化&双ISP/美国优化/镇江/宁波/成都/枣庄/扬州/绍兴</a></li> </ul> </div> <div class="post-go"> <div class="title" id="comments"> <h3>评论</h3> </div> <div id="comments" class="no_webshot"> <form action="/index.php?comment-post-ajax-1.html" method="post" id="ctf_form"> <div class="comt"> <div class="comt-title"> <img alt="" data-src="/static/img/avatar.png" class="avatar avatar-50 photo avatar-default" height="50" width="50" src="/view/hfdr_dux/img/avatar-default.png"> </div> <div class="comt-box"> <input type="hidden" name="cid" value="10" /> <input type="hidden" name="id" value="241512" /> <input type="hidden" name="reply_commentid" value="0" /> <textarea placeholder="你的评论可以一针见血" class="input-block-level comt-area" name="content" id="ctf_content" cols="100%" rows="3" tabindex="1" onkeydown="if(event.ctrlKey&&event.keyCode==13){document.getElementById('submit').click();return false};"></textarea> <div class="comt-ctrl"> <div class="comt-tips"><input type="hidden" name="comment_post_ID" value="655" id="comment_post_ID"> <input type="hidden" name="comment_parent" id="comment_parent" value="0"> <div id="ctf_tips"></div> </div> <button type="submit" name="submit" id="ctf_submit" tabindex="5">提交评论</button> </div> </div> <div class="comt-comterinfo" id="comment-author-info"> <ul> <li><input class="ipt" type="text" name="author" id="ctf_author" value="" tabindex="2" placeholder="昵称(必填)"></li> <li> <input class="ipt" type="text" name="vcode" id="ctf_vcode" value="" tabindex="2" placeholder="验证码"> </li> <li> <img id="captchaPic" src="/index.php?comment-vcode" onclick="this.src='/index.php?comment-vcode-r-'+Math.random();" alt="验证码" /> </li> </ul> </div> </div> </form> </div> <div id="postcomments"> <ol class="commentlist" id="comment_cont"> <div class="pagenav"><div class="load-more j-load-more" id="load_more">暂无评论</div></div> </ol> </div> </div> </div> </div> <div class="sidebar"> <div class="widget widget_ui_posts widget-on-phone"> <h3>热门推荐</h3> <ul> <li><a href="https://www.yunzhuji.net/yunfuwuqi/283876.html"> <span class="thumbnail"><img data-src="/pic/10_283876.jpg" alt="如何搭建服务器并配置相关文件?" src="/view/hfdr_dux/img/jz.png" class="thumb"></span> <span class="text">如何搭建服务器并配置相关文件?</span> <span class="muted">2024-12-18</span></a></li> <li><a href="https://www.yunzhuji.net/yunfuwuqi/252043.html"> <span class="thumbnail"><img data-src="/pic/10_252043.jpg" alt="如何利用DedeCMS和Ajax实现搜索下拉提示功能?" src="/view/hfdr_dux/img/jz.png" class="thumb"></span> <span class="text">如何利用DedeCMS和Ajax实现搜索下拉提示功能?</span> <span class="muted">2024-12-18</span></a></li> <li><a href="https://www.yunzhuji.net/yunfuwuqi/177070.html"> <span class="thumbnail"><img data-src="/pic/10_177070.jpg" alt="计算机能直接识别的语言是啥" src="/view/hfdr_dux/img/jz.png" class="thumb"></span> <span class="text">计算机能直接识别的语言是啥</span> <span class="muted">2024-12-18</span></a></li> <li><a href="https://www.yunzhuji.net/yunfuwuqi/285356.html"> <span class="thumbnail"><img data-src="/pic/10_285356.jpg" alt="如何进行负载均衡高并发测试?" src="/view/hfdr_dux/img/jz.png" class="thumb"></span> <span class="text">如何进行负载均衡高并发测试?</span> <span class="muted">2024-12-18</span></a></li> <li><a href="https://www.yunzhuji.net/yunfuwuqi/282645.html"> <span class="thumbnail"><img data-src="/pic/10_282645.jpg" alt="如何在CSS中有效清除浮动?" src="/view/hfdr_dux/img/jz.png" class="thumb"></span> <span class="text">如何在CSS中有效清除浮动?</span> <span class="muted">2024-12-18</span></a></li> </ul> </div> <div class="widget widget_ui_posts widget-on-phone"> <h3>随机推荐</h3> <ul> <li><a href="https://www.yunzhuji.net/vps/33.html"><span class="thumbnail"><img data-src="/upload/article/20241221/170840676685983177fPQBuSn.jpg" alt="#双诞# zgovps:美国9929+CMIN2双高端线路VPS低至$30/年,老用户续费送“内存/硬盘/流量/带宽”" src="/view/hfdr_dux/img/jz.png" class="thumb"></span> <span class="text">#双诞# zgovps:美国9929+CMIN2双高端线路VPS低至$30/年,老用户续费送“内存/硬盘/流量/带宽”</span><span class="muted">2024-12-21 17:08</span></a></li> <li><a href="https://www.yunzhuji.net/vps/32.html"><span class="thumbnail"><img data-src="/upload/article/20241221/17070367668537600a3NDjHJn.jpg" alt="raksmart:10Gbps带宽不限流量香港服务器,$9729,2*e5-2696v4/128g内存/4*1TSSD/5IP" src="/view/hfdr_dux/img/jz.png" class="thumb"></span> <span class="text">raksmart:10Gbps带宽不限流量香港服务器,$9729,2*e5-2696v4/128g内存/4*1TSSD/5IP</span><span class="muted">2024-12-21 17:07</span></a></li> <li><a href="https://www.yunzhuji.net/vps/105.html"><span class="thumbnail"><img data-src="/upload/article/20250209/23300367a8c9fb27bf6Io0pOv.jpg" alt="locvps特价8折促销香港大埔CN2+BGP网络VPS,2G内存,低至24元/月" src="/view/hfdr_dux/img/jz.png" class="thumb"></span> <span class="text">locvps特价8折促销香港大埔CN2+BGP网络VPS,2G内存,低至24元/月</span><span class="muted">2025-02-09 23:30</span></a></li> <li><a href="https://www.yunzhuji.net/vps/83.html"><span class="thumbnail"><img data-src="/upload/article/20250129/231212679a454cf29e7pkmptH.jpg" alt="cloudcone:中国新年美国VPS特别促销,$28/年,2G内存/4核/240g硬盘/5T流量" src="/view/hfdr_dux/img/jz.png" class="thumb"></span> <span class="text">cloudcone:中国新年美国VPS特别促销,$28/年,2G内存/4核/240g硬盘/5T流量</span><span class="muted">2025-01-29 23:12</span></a></li> <li><a href="https://www.yunzhuji.net/vps/5.html"><span class="thumbnail"><img data-src="/upload/article/20241214/164427675d456be2f9fbwd9M3.png" alt="搬瓦工:DC6特价VPS,$49/年,1G内存/1核/20gSSD/1T流量/2.5Gbps带宽,CN2 GIA+CMIN2双高端网络" src="/view/hfdr_dux/img/jz.png" class="thumb"></span> <span class="text">搬瓦工:DC6特价VPS,$49/年,1G内存/1核/20gSSD/1T流量/2.5Gbps带宽,CN2 GIA+CMIN2双高端网络</span><span class="muted">2024-12-14 16:44</span></a></li> </ul> </div> <div class="widget widget_ui_comments"> <h3>最新评论</h3> <ul> <li><a href="https://www.yunzhuji.net/cdn/4.html" title="莫名CDN的评论"><img data-src="https://www.yunzhuji.net/static/img/avatar.png" class="avatar avatar-50 photo" height="50" width="50" src="/view/hfdr_dux/img/avatar-default.png"> <strong>莫名CDN</strong>4月前 说:<br>本站CDN与莫名CDN同款、亚太CDN、速度还不错,值得推荐。</a></li> <li><a href="https://www.yunzhuji.net/zztj/6.html" title="ucloud的评论"><img data-src="https://www.yunzhuji.net/static/img/avatar.png" class="avatar avatar-50 photo" height="50" width="50" src="/view/hfdr_dux/img/avatar-default.png"> <strong>ucloud</strong>4月前 说:<br>感谢推荐我们公司产品、有什么活动会第一时间公布!</a></li> <li><a href="https://www.yunzhuji.net/zztj/2.html" title="游客的评论"><img data-src="https://www.yunzhuji.net/static/img/avatar.png" class="avatar avatar-50 photo" height="50" width="50" src="/view/hfdr_dux/img/avatar-default.png"> <strong>游客</strong>4月前 说:<br>我在用这类站群服务器、还可以. 用很多年了。</a></li> </ul> </div> <div class="widget-on-phone widget widget_ui_tags"> <h3>标签云</h3> <div class="items"> <a href="https://www.yunzhuji.net/tag/racknerd-cn2/">racknerd cn2</a> <a href="https://www.yunzhuji.net/tag/%E9%B2%A8%E9%B1%BC%E6%9C%BA%E6%88%BF/">鲨鱼机房</a> <a href="https://www.yunzhuji.net/tag/%E7%BE%8E%E5%9B%BD%E5%8E%9F%E7%94%9Fip/">美国原生ip</a> <a href="https://www.yunzhuji.net/tag/lisahost/">lisahost</a> <a href="https://www.yunzhuji.net/tag/%E7%BE%8E%E5%9B%BD10g%E5%B8%A6%E5%AE%BD%E6%9C%8D%E5%8A%A1%E5%99%A8/">美国10g带宽服务器</a> <a href="https://www.yunzhuji.net/tag/%E9%A6%99%E6%B8%AFvps%E6%8E%A8%E8%8D%90/">香港vps推荐</a> <a href="https://www.yunzhuji.net/tag/%E6%97%A5%E6%9C%ACvps%E6%8E%A8%E8%8D%90/">日本vps推荐</a> <a href="https://www.yunzhuji.net/tag/hosteons/">hosteons</a> <a href="https://www.yunzhuji.net/tag/velovps%E8%AF%84%E6%B5%8B/">velovps评测</a> <a href="https://www.yunzhuji.net/tag/raksmart%E5%AE%98%E7%BD%91/">raksmart官网</a> <a href="https://www.yunzhuji.net/tag/%E6%90%AC%E7%93%A6%E5%B7%A5%E4%BA%91/">搬瓦工云</a> <a href="https://www.yunzhuji.net/tag/%E4%B8%93%E7%BA%BF%E8%8D%B7%E5%85%B0vps/">专线荷兰vps</a> <a href="https://www.yunzhuji.net/tag/zorocloud/">zorocloud</a> <a href="https://www.yunzhuji.net/tag/%E8%8D%B7%E5%85%B0vps-%E9%AB%98%E9%98%B2/">荷兰vps 高防</a> <a href="https://www.yunzhuji.net/tag/%E5%A4%A7%E5%B8%A6%E5%AE%BD%E7%BE%8E%E5%9B%BD%E6%9C%8D%E5%8A%A1%E5%99%A8/">大带宽美国服务器</a> <a href="https://www.yunzhuji.net/tag/%E7%BE%8E%E5%9B%BD%E4%BD%8F%E5%AE%85vps/">美国住宅vps</a> <a href="https://www.yunzhuji.net/tag/racknerd%E4%BF%83%E9%94%80/">racknerd促销</a> <a href="https://www.yunzhuji.net/tag/%E6%90%AC%E7%93%A6%E5%B7%A5/">搬瓦工</a> <a href="https://www.yunzhuji.net/tag/%E7%BE%8E%E5%9B%BD%E9%82%AE%E4%BB%B6%E6%9C%8D%E5%8A%A1%E5%99%A8/">美国邮件服务器</a> <a href="https://www.yunzhuji.net/tag/colocrossing%E6%B4%BB%E5%8A%A8/">colocrossing活动</a> <a href="https://www.yunzhuji.net/tag/%E4%B8%93%E7%BA%BF%E7%BE%8E%E5%9B%BDvps/">专线美国vps</a> </div> </div> <!-- 内页右侧 --> <div class="widget-on-phone widget widget_media_image"><a href="#"><img width="360" height="206" src="https://img.4414.cn/forum/202412/15/225418gjh3p5958ux0g8pz.jpg" class="image wp-image-75276 attachment-full size-full entered lazyloaded" alt="" style="max-width: 100%; height: auto;" decoding="async" fetchpriority="high" data-lazy-src="https://img.4414.cn/forum/202412/15/225418gjh3p5958ux0g8pz.jpg" data-ll-status="loaded"><noscript><img width="360" height="206" src="https://img.4414.cn/forum/202412/15/225418gjh3p5958ux0g8pz.jpg" class="image wp-image-75276 attachment-full size-full" alt="" style="max-width: 100%; height: auto;" decoding="async" fetchpriority="high" /></noscript></a></div> <!-- 内页右侧 --> </div> </section> <footer class="footer"> <div class="container"> <div class="flinks"> <strong>友情链接</strong> <ul class='xoxo blogroll'> <li><a href="https://www.yunzhuji.net/" rel="noopener" title="主机测评" target="_blank">主机测评</a></li> </ul> </div> <p><a target="_blank" rel="nofollow"><strong><span style="color: #ff0000;">本站不销售产品、不代购、不提供技术支持,仅分享信息,请遵纪守法、文明上网。</span></strong></a> <br> Copyright © 2024 <a href="/">云主机测评网</a> - All Rights Reserved 粤ICP备2025388860号</p> </div> </footer> <div class="karbar karbar-rb"> <ul> <li class="karbar-totop"><a href="javascript:(TBUI.scrollTo());"><i class="tbfa"></i></a></li> </ul> </div> <script> window.TBUI = {"www":"https:\/\/www.yunzhuji.net\/hfdr_dux","uri":"https:\/\/www.yunzhuji.net\/view\/hfdr_dux","roll":"1 2 3"}</script> <script type='text/javascript' src='/view/hfdr_dux/js/loader.js' id='loader-js'></script> <script> </script> </body> </html> <script type="text/javascript" src="/view/hfdr_dux/js/style.js"></script> <script src="/view/hfdr_dux/js/img-view.js"></script> <div class="rewards-popover-mask" data-event="rewards-close" style="display: none;"></div> <div class="rewards-popover" style="display: none;"> <h3>觉得文章有用就打赏一下文章作者</h3> <h5>非常感谢你的打赏,我们将继续给力更多优质内容,让我们一起创建更加美好的网络世界!</h5> <div class="rewards-popover-item"> <h4>支付宝扫一扫打赏</h4> <img src="/view/hfdr_dux/img/zfb.png"> </div> <div class="rewards-popover-item"><h4>微信扫一扫打赏</h4> <img src="/view/hfdr_dux/img/wx.png"> </div> <span class="rewards-popover-close" data-event="rewards-close"><i class="tbfa"></i></span> </div> <script> $(".article-content img").on("click",function (){ window.ViewImage && ViewImage.init('.article-content img'); }); </script> <script type="text/javascript"> $("#likes_do").click(function () { $.getJSON("", function(data){ if(data.err){ alert(data.msg); }else{ if( data.dolike == 1 ){ $("#likes_do").attr(""); }else{ $("#likes_do").attr(""); } $("#likes_count").html(data.likes_count); alert(data.msg); } }); }); </script> <script type="text/javascript"> //回复某评论 function reply_comment(commentid){ $("input[name='reply_commentid']").val(commentid); var comment = $("#comment_"+commentid+">.msgarticle").html(); $("#reply_comment_content").html(comment); $("#reply_comment_div").show(); } //取消回复某评论 function cancel_reply_comment() { $("input[name='reply_commentid']").val(0); $("#reply_comment_div").hide(); } //加载更多评论 (function(){ var obj = $("#load_more"); var next_url = obj.attr("next_url"); var isnext = obj.attr("isnext"); var no_more = function() { obj.html("没有更多了"); if(typeof load_more != "undefined") obj.off("click", load_more); if(typeof auto_load_more != "undefined") $(window).off("scroll", auto_load_more); } if(isnext < 1) { no_more(); return; } var leJosnLock = false; var load_more = function() { if(!next_url || leJosnLock) return; obj.html("玩命加载中..."); leJosnLock = true; $.get(next_url, function(data) { try{ var json = eval("("+data+")"); next_url = json.next_url; $.each(json.list_arr, function(i,item) { var s = '<li class="comment byuser comment-author-admin bypostauthor even thread-even depth-1">'; s += '<span class="comt-f">'+item.date+'</span><div class="comt-avatar"><img alt="'+item.author+'" src="'+item.avatar+'" class="avatar avatar-50 photo" src="view/hfdr-dux/img/avatar-default.png"></div>'; s += '<div class="comt-main"><p>'+item.content+'</p><div class="comt-meta"><span class="comt-author">'+item.author+'</span>('+item.ip+')</div></div>'; s += '</li>'; $("#comment_cont>li:last").after(s); }); obj.html("更多评论"); leJosnLock = false; if(json.isnext < 1) no_more(); }catch(e){ alert(data); } }); } obj.click(load_more); })(); </script>