编辑点评框脚本是动态 [英] Edit comment box script to be dynamic
本文介绍了编辑点评框脚本是动态的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
为了编辑Facebook的插件评论框的剧本是关系到每个单独的动态后,并显示评论,我已经添加了这两条线code进入脚本:
in order to edit the script of facebook plugin comment box to be dynamic and displays comments related to each post separately, I've added these 2 lines of code into the script :
var related = document.getElementById('fb-related');
related.setAttribute("data-href", "articles.aspx?art_id=<%# Request.QueryString["art_id"] %>"); ... (the rest of code) </script>
而这正是在评论框出现在div
and this is the div where the comment box appear
<div id="fb-related" class="fb-comments" data-numposts="5" data-colorscheme="light"></div>
但没有任何反应和评论框不会出现在所有的,或者说出现的的意见插件需要一个href参数。!任何帮助吗?
请注意 我使用asp.net使用C#的
推荐答案
将在codeBehind的数据href属性与C#code中的pageLoad的事件,这样,当页面渲染插件就已经有一个数据-href
Put the data-href attribute in CodeBehind on the PageLoad event with C# code so when the page renders the plugin will already have a data-href
这篇关于编辑点评框脚本是动态的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文