码迷,mamicode.com
首页 > 其他好文 > 详细

sydr点击次数代码

时间:2014-08-27 16:15:07      阅读:311      评论:0      收藏:0      [点我收藏+]

标签:style   http   color   os   java   io   for   ar   2014   

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta charset="UTF-8">
<meta content="width=device-width, initial-scale=1, user-scalable=no, minimum-scale=1.0, maximum-scale=1.0" name="viewport">
<title>双语达人</title>
<script type="text/javascript" src="http://img.cankaoxiaoxi.com/js/lib/jquery.js"></script>
<base target="_blank">
</head>
<body>
<style>
*{margin:0; padding:0;}
a, a:visited {text-decoration:none;}
.list img {width:90px; heiht:68px;float:left; margin:7px 15px 7px 9px; border-radius:10px;border:none;}
.list img:nth-child(1) {margin:9px 15px 7px 9px;}
.list li {height:82px; border-top:1px solid #cccccc; list-style:none; clear:both;}
.list li:nth-child(1) {border-top:none;}
.list a {color:#000000; font-size:16px; line-height:20px; font-family:"微软雅黑";}
</style>
<!--要闻 start-->
<article>
<section class="pindao">
<ul class="list">

<li>
<div style="float:left; display:block;"><a href="http://m.cankaoxiaoxi.com/diglossia/2014/0626/406203.shtml" onclick="show(1)" title="Perfection fatigue:完美疲劳"><img src="http://upload.cankaoxiaoxi.com/2014/0626/1403744955754.jpg" /></a></div>
<div style="float:left; margin-top:10px; width:190px; diplay:block;"><a href="http://m.cankaoxiaoxi.com/diglossia/2014/0626/406203.shtml" onclick="show(1)" title="Perfection fatigue:完美疲劳">Perfection fatigue:完美疲劳</a></div>
点击次数:<span class="result"></span>
</li>

<li>
<div style="float:left; display:block;"><a href="http://m.cankaoxiaoxi.com/diglossia/2014/0625/405746.shtml" onclick="show(2)" title="美国人为何把足球叫“soccer”?"><img src="http://upload.cankaoxiaoxi.com/2014/0626/1403745469829.jpg" /></a></div>
<div style="float:left; margin-top:10px; width:190px; diplay:block;"><a href="http://m.cankaoxiaoxi.com/diglossia/2014/0625/405746.shtml" onclick="show(2)" title="美国人为何把足球叫“soccer”?">美国人为何把足球叫“soccer”?</a></div>
点击次数:<span class="result"></span>
</li>

<li>
<div style="float:left; display:block;"><a href="http://m.cankaoxiaoxi.com/diglossia/2014/0619/403109.shtml" onclick="show(3)" title="Clicktivism:点击行动主义"><img src="http://upload.cankaoxiaoxi.com/2014/0619/1403168667593.jpg" /></a></div>
<div style="float:left; margin-top:10px; width:190px; diplay:block;"><a href="http://m.cankaoxiaoxi.com/diglossia/2014/0619/403109.shtml" onclick="show(3)" title="Clicktivism:点击行动主义">Clicktivism:点击行动主义</a></div>
点击次数:<span class="result"></span>
</li>

<li>
<div style="float:left; display:block;"><a href="http://m.cankaoxiaoxi.com/diglossia/2014/0619/402834.shtml" onclick="show(4)" title="Foul play:犯规"><img src="http://upload.cankaoxiaoxi.com/2014/0619/1403144117335.jpg" /></a></div>
<div style="float:left; margin-top:10px; width:190px; diplay:block;"><a href="http://m.cankaoxiaoxi.com/diglossia/2014/0619/402834.shtml" onclick="show(4)" title="Foul play:犯规">Foul play:犯规</a></div>
点击次数:<span class="result"></span>
</li>

<li>
<div style="float:left; display:block;"><a href="http://m.cankaoxiaoxi.com/diglossia/2014/0616/401469.shtml" onclick="show(5)" title="Goal-line technology:门线技术"><img src="http://upload.cankaoxiaoxi.com/2014/0616/1402907925590.jpg" /></a></div>
<div style="float:left; margin-top:10px; width:190px; diplay:block;"><a href="http://m.cankaoxiaoxi.com/diglossia/2014/0616/401469.shtml" onclick="show(5)" title="Goal-line technology:门线技术">Goal-line technology:门线技术</a></div>
点击次数:<span class="result"></span>
</li>

<li>
<div style="float:left; display:block;"><a href="http://m.cankaoxiaoxi.com/diglossia/2014/0616/401326.shtml" onclick="show(6)" title="Own goal:乌龙球"><img src="http://upload.cankaoxiaoxi.com/2014/0616/1402889854223.jpg" /></a></div>
<div style="float:left; margin-top:10px; width:190px; diplay:block;"><a href="http://m.cankaoxiaoxi.com/diglossia/2014/0616/401326.shtml" onclick="show(6)" title="Own goal:乌龙球">Own goal:乌龙球</a></div>
点击次数:<span class="result"></span>
</li>

<li>
<div style="float:left; display:block;"><a href="http://m.cankaoxiaoxi.com/diglossia/2014/0616/401168.shtml" onclick="show(7)" title="Butterfingers:黄油手"><img src="http://upload.cankaoxiaoxi.com/2014/0616/1402880682513.jpg" /></a></div>
<div style="float:left; margin-top:10px; width:190px; diplay:block;"><a href="http://m.cankaoxiaoxi.com/diglossia/2014/0616/401168.shtml" onclick="show(7)" title="Butterfingers:黄油手">Butterfingers:黄油手</a></div>
点击次数:<span class="result"></span>
</li>

<li>
<div style="float:left; display:block;"><a href="http://m.cankaoxiaoxi.com/diglossia/2014/0612/399874.shtml" onclick="show(8)" title="World Cup curse:世界杯魔咒"><img src="http://upload.cankaoxiaoxi.com/2014/0612/1402544201781.jpg" /></a></div>
<div style="float:left; margin-top:10px; width:190px; diplay:block;"><a href="http://m.cankaoxiaoxi.com/diglossia/2014/0612/399874.shtml" onclick="show(8)" title="World Cup curse:世界杯魔咒">World Cup curse:世界杯魔咒</a></div>
点击次数:<span class="result"></span>
</li>

<li>
<div style="float:left; display:block;"><a href="http://m.cankaoxiaoxi.com/diglossia/2014/0611/399288.shtml" onclick="show(9)" title="Like crazy:不管不顾"><img src="http://upload.cankaoxiaoxi.com/2014/0611/1402452805309.jpg" /></a></div>
<div style="float:left; margin-top:10px; width:190px; diplay:block;"><a href="http://m.cankaoxiaoxi.com/diglossia/2014/0611/399288.shtml" onclick="show(9)" title="Like crazy:不管不顾">Like crazy:不管不顾</a></div>
点击次数:<span class="result"></span>
</li>

<li>
<div style="float:left; display:block;"><a href="http://m.cankaoxiaoxi.com/diglossia/2014/0609/398399.shtml" onclick="show(10)" title="Gecko gloves:壁虎手套"><img src="http://upload.cankaoxiaoxi.com/2014/0609/1402295388439.jpg" /></a></div>
<div style="float:left; margin-top:10px; width:190px; diplay:block;"><a href="http://m.cankaoxiaoxi.com/diglossia/2014/0609/398399.shtml" onclick="show(10)" title="Gecko gloves:壁虎手套">Gecko gloves:壁虎手套</a></div>
点击次数:<span class="result"></span>
</li>
</ul>

</section>
</article>
<!--要闻 end-->

<script>
var arr = new Array()
var oUl = document.getElementsByTagName(‘ul‘);
for (j=0;j<oUl[0].children.length; j++){
arr[j]= 0;}

function show(p){

arr[p-1]++;
var mm=oUl[0].children[p-1].children[2];
mm.innerHTML = arr[p-1];
}

function getScrollTop(){
  var scrollTop = 0, bodyScrollTop = 0, documentScrollTop = 0;
  if(document.body){
    bodyScrollTop = document.body.scrollTop;
  }
  if(document.documentElement){
    documentScrollTop = document.documentElement.scrollTop;
  }
  scrollTop = (bodyScrollTop - documentScrollTop > 0) ? bodyScrollTop : documentScrollTop;
  return scrollTop;
}
//文档的总高度
function getScrollHeight(){
  var scrollHeight = 0, bodyScrollHeight = 0, documentScrollHeight = 0;
  if(document.body){
    bodyScrollHeight = document.body.scrollHeight;
  }
  if(document.documentElement){
    documentScrollHeight = document.documentElement.scrollHeight;
  }
  scrollHeight = (bodyScrollHeight - documentScrollHeight > 0) ? bodyScrollHeight : documentScrollHeight;
  return scrollHeight;
}
//浏览器视口的高度
function getWindowHeight(){
  var windowHeight = 0;
  if(document.compatMode == "CSS1Compat"){
    windowHeight = document.documentElement.clientHeight;
  }else{
    windowHeight = document.body.clientHeight;
  }
  return windowHeight;
}

window.onscroll = function(){
  if(getScrollTop() + getWindowHeight() == getScrollHeight()){

var oUl = document.getElementsByTagName(‘ul‘);
var num = oUl[0].children.length;

//alert (111);
// alert(oUl[0].children[0]);
$.getJSON("http://app.cankaoxiaoxi.com/?app=system&controller=channel_tt&action=index_dr&catid=304&size=5&num=" + num +"&jsoncallback=?", function(data){
if(data)
{
//var oUl = document.getElementsByTagName(‘ul‘);
for(var elem in data){

oUl[0].innerHTML=oUl[0].innerHTML+"<li onclick=\"window.location.href=‘"+data[elem].url+"‘;\"><div style=\"float:left; display:block;\"><a href=\""+data[elem].url+"\" title=\""+data[elem].title+"\"><img src=\""+data[elem].img+"\" /></a></div><div style=\"float:left; margin-top:10px; width:190px; diplay:block;\"><a href=\""+data[elem].url+"\" title=\""+data[elem].title+"\">"+data[elem].title+"</a></div></li>";
}
}
});




  }
}
</script>
<script type="text/javascript">
var _bdhmProtocol = (("https:" == document.location.protocol) ? " https://" : " http://");
document.write(unescape("%3Cscript src=‘" + _bdhmProtocol + "hm.baidu.com/h.js%3F308b87570281daa02f0d31c085c39163‘ type=‘text/javascript‘%3E%3C/script%3E"));
</script>
</body>
</html>

sydr点击次数代码

标签:style   http   color   os   java   io   for   ar   2014   

原文地址:http://www.cnblogs.com/moliwanzi/p/3939595.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!