威尼斯赌博游戏

列表也批量根绝地址判断地区JS 判断地区显示

来源: www.zngps.com| 2018-01-16 13:45
模板内容
       {dede:list pagesize='20' orderby='id'}       
         <dl>
            <dt><b>14</b>2017-12</dt>
            <dd>
              <h4><a href="[field:arcurl/]" title="[field:fulltitle/]" target="_blank"><span id="aa[field:global name=autoindex runphp="yes"]@me=@me-1;[/field:global]"></span>[field:fulltitle/]​</a></h4>
              <p>[field:description/]...<a href="[field:arcurl/]" title="详细" target="_blank">【详细】</a></p>
            </dd>
          </dl>
         {/dede:list} 
 <script src="/templates/default/js/ping.js"></script>

一下内容保存成JS文件
var url;  
url = window.location.hostname;    
 var str_before =  url.split('.')[0];
url=str_before
	var a = new Array("0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "13", "14", "15", "16", "17", "18", "19") 
for(var i = 0;i < a.length; i++) {
	
	if(document.getElementById("aa"+[i]) && url ==326)
{
document.getElementById('aa'+[i]).innerHTML = "广告位1"; }
//alert("aa"+[i]); 
//alert(url); 
}






猜你喜欢
推荐
随机推荐
相关文档
Top
Baidu