点击进入知科官方网站
查看: 2425  |  回复: 0
 
 
Official服务
积分:16745
注册时间:2012-01-02
最后登录:2015-09-24
发送短消息
发表于 2012-10-29 12:46
修改前:
 
 
修改后效果:
 
 
 
打开 /bbs/index.aspx
 
<td><asp:Literal ID="Literal_statistics" runat="server"></asp:Literal></td>
<td class="ar">
 
 
 
 
修改为
<td id="self_bbs_statistics"><asp:Literal ID="Literal_statistics" runat="server"></asp:Literal></td>                            
<td class="ar">
<script type="text/javascript">
    function self_change_total(increase,re)
    {
        var obj=document.getElementById("self_bbs_statistics");
        var val=obj.innerHTML.match(re)[0];val=val.substring(val.indexOf(">")+1);val=val.substring(0,val.indexOf("<"));
        var newval=parseInt(val)+parseInt(increase);
        obj.innerHTML=obj.innerHTML.replace(obj.innerHTML.match(re)[0],obj.innerHTML.match(re)[0].replace(val,newval));
    }
    self_change_total(100,/今日:<\/strong>(.*)<\/td>/ig);
    self_change_total(120,/昨日:<\/strong>(.*)<\/td>/ig);
    self_change_total(3000,/帖子:<\/strong>(.*)<\/td>/ig);
    self_change_total(1000,/会员:<\/strong>(.*)<\/td>/ig);
</script>
回复帖子