网站首页  汉语字词  英语词汇  考试资料  写作素材  旧版资料

请输入您要查询的范文:

 

标题 z-blog评论留言的引用按钮写法详解
范文
    点评:关键字描述:详解 按钮 引用 评论 留言 < " > class .innerHTML z-blog默认主题的模板b_article_comment.html中 <ul> <li><span><关键字描述:详解 按钮 引用 评论 留言 < " > class .innerHTML
    z-blog默认主题的模板b_article_comment.html中
    <ul>
    <li><span><a onclick="InsertQuote(this.parentNode.parentNode.parentNode.getElementsByTagName('a')[2].innerHTML,this.parentNode.parentNode.parentNode.getElementsByTagName('li')[2].innerHTML);return false;" href=""><img src="<#ZC_BLOG_HOST#>image/common/quote.gif" height="9" width="9" /></a></span>&nbsp;<a name="cmt<#article/comment/id#>"><#article/comment/count#></a>.<a><#article/comment/name#></a></li>
    <li><a href="<#article/comment/urlencoder#>" rel="nofollow" target="_blank"><#article/comment/url#></a></li>
    <li><#article/comment/content#></li>
    <li><#article/comment/posttime#>&nbsp;<a href="#comment" onclick="RevertComment('<#article/comment/id#>')"><#ZC_MSG265#></a></li>
    </ul>要把其格式改成如下结构,z-blog引用评论的按钮要如何写呢?:
    <div>
    <cite>评论者</cite>
    <blockquote>评论内容</blockquote>
    <p>网站</p>
    <p>时间</p>
    </div>讲解z-blog引用所用的JS函数:
    引用的函数: InsertQuote(参数1[评论者],参数2[评论内容])
    this.parentNode 表示该节点的上一节点
    getElementsByTagName('a')[2].innerHTML 表示获取第二个<a>元素的内容,即<#article/comment/name#>
    同上,getElementsByTagName('li')[2].innerHTML 为<#article/comment/content#>
    修改后的代码
    <div>
    <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>
随便看

 

在线学习网范文大全提供好词好句、学习总结、工作总结、演讲稿等写作素材及范文模板,是学习及工作的有利工具。

 

Copyright © 2002-2024 cuapp.net All Rights Reserved
更新时间:2025/5/22 7:06:17