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>