国产探花免费观看_亚洲丰满少妇自慰呻吟_97日韩有码在线_资源在线日韩欧美_一区二区精品毛片,辰东完美世界有声小说,欢乐颂第一季,yy玄幻小说排行榜完本

首頁(yè) > CMS > Z-Blog > 正文

z-blog評(píng)論留言的引用按鈕寫法詳解

2024-07-09 22:57:47
字體:
來(lái)源:轉(zhuǎn)載
供稿:網(wǎng)友
點(diǎn)評(píng):關(guān)鍵字描述:詳解 按鈕 引用 評(píng)論 留言 < " > class .innerHTML z-blog默認(rèn)主題的模板b_article_comment.html中 <ul class="msg"> <li class="msgname"><span class="comment-quote-icon"><
 
 
關(guān)鍵字描述:詳解 按鈕 引用 評(píng)論 留言 < " > class .innerHTML

z-blog默認(rèn)主題的模板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"    <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>

要把其格式改成如下結(jié)構(gòu),z-blog引用評(píng)論的按鈕要如何寫呢?:

<div class="msg"><cite>評(píng)論者</cite><blockquote>評(píng)論內(nèi)容</blockquote><p>網(wǎng)站</p><p>時(shí)間</p></div>
  • 講解z-blog引用所用的JS函數(shù):
    1. 引用的函數(shù): InsertQuote(參數(shù)1[評(píng)論者],參數(shù)2[評(píng)論內(nèi)容])
    2. this.parentNode 表示該節(jié)點(diǎn)的上一節(jié)點(diǎn)
    3. getElementsByTagName('a')[2].innerHTML 表示獲取第二個(gè)<a>元素的內(nèi)容,即<#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>評(píng)論者</cite><blockquote>評(píng)論內(nèi)容</blockquote><p>網(wǎng)站</p><p>時(shí)間</p></div>
     
發(fā)表評(píng)論 共有條評(píng)論
用戶名: 密碼:
驗(yàn)證碼: 匿名發(fā)表
主站蜘蛛池模板: 南川市| 襄汾县| 色达县| 三台县| 溧阳市| 泗阳县| 荥阳市| 尚义县| 佛坪县| 洪湖市| 九江市| 连南| 文成县| 井陉县| 石门县| 桑日县| 岑溪市| 华亭县| 南汇区| 孝感市| 夏河县| 德保县| 井研县| 商城县| 潮州市| 闸北区| 武乡县| 巧家县| 陆川县| 翁牛特旗| 安达市| 乐至县| 海宁市| 桐乡市| 张家港市| 新民市| 怀化市| 凉城县| 长寿区| 花莲市| 互助|