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

请输入您要查询的考试资料:

 

标题 z-blog评论留言的引用按钮写法详解
内容
    点评:关键字描述:详解 按钮 引用 评论 留言 < > class .innerhtml z-blog默认主题的模板b_article_comment.html中 <ul class=msg> <li class=msgname><span class=comment-quote-icon><关键字描述:详解 按钮 引用 评论 留言 < > class .innerhtml
    z-blog默认主题的模板b_article_comment.html中
    <ul class=msg>
    <li class=msgname><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=><img src=<#zc_blog_host#>image/common/quote.gif height=9 width=9 alt=quote title=quote /></a></span>&nbsp;<a name=cmt<#article/comment/id#>><#article/comment/count#></a>.<a><#article/comment/name#></a></li>
    <li class=msgurl><a href=<#article/comment/urlencoder#> rel=nofollow target=_blank><#article/comment/url#></a></li>
    <li class=msgarticle><#article/comment/content#></li>
    <li class=msgtime><#article/comment/posttime#>&nbsp;<a href=#comment onclick=revertcomment('<#article/comment/id#>')><#zc_msg265#></a></li>
    </ul>要把其格式改成如下结构,z-blog引用评论的按钮要如何写呢?: 
    <div class=msg>
    <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 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>
随便看

 

在线学习网考试资料包含高考、自考、专升本考试、人事考试、公务员考试、大学生村官考试、特岗教师招聘考试、事业单位招聘考试、企业人才招聘、银行招聘、教师招聘、农村信用社招聘、各类资格证书考试等各类考试资料。

 

Copyright © 2002-2024 cuapp.net All Rights Reserved
更新时间:2025/5/23 9:55:44