具体方法链接:
http://bbs.rainbowsoft.org/thread-22778-1-14.html
默认主题的模板b_article_comment.html中
复制内容到剪贴板
代码:
<span class="comment-quote-icon"><a onclick="InsertQuote(this.parentNode.parentNode.parentNode.getElementsByTagName('a')[2].innerHTML,this.parentNode.parentNode.parentNode.getElementsByTagName('li')[2].innerHTML);return false;" href="javascript:void(0)"><img src="<#ZC_BLOG_HOST#>image/common/quote.gif" height="9" width="9" alt="quote" title="quote" /></a></span>要把该框格式改成:
复制内容到剪贴板
代码:
<div class="msg">
<cite>评论者</cite>
<blockquote>评论内容</blockquote>
<p>网站</p>
<p>时间</p>
</div>具体怎么改呢?
讲解:
1. 引用的函数: InsertQuote(评论者,评论内容)
2. this.parentNode 表示该节点的上一节点
3. getElementsByTagName('a')[2].innerHTML 表示获取第二个<a>元素的内容,即<#article/comment/name#>
4. 同上,getElementsByTagName('li')[2].innerHTML 为<#article/comment/content#>
例子:
复制内容到剪贴板
代码:
<div class="msg">
<a onclick="InsertQuote(this.parentNode.getElementsByTagName('CITE')[0].innerHTML,this.parentNode.getElementsByTagName('BLOCKQUOTE')[0].innerHTML);return false;" href="#comment">引用</a>
<cite>评论者</cite>
<blockquote>评论内容</blockquote>
<p>网站</p>
<p>时间</p>
</div>