首页 > 代码库 > cktt点击次数代码
cktt点击次数代码
<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>
<link rel="stylesheet" type="text/css" href="http://img.cankaoxiaoxi.com/templates/cankaoxiaoxi/css/common.css" media="all" />
<link rel="stylesheet" type="text/css" href="http://img.cankaoxiaoxi.com/templates/cankaoxiaoxi/css/module.css" media="all" />
<script type="text/javascript" src="http://img.cankaoxiaoxi.com/js/lib/jquery.js"></script>
</head>
<body>
<style>
*{margin:0; padding:0;}
a, a:visited {text-decoration:none;}
.list li {height:61px; border-top:1px solid #cccccc; list-style:none; background:url(‘http://img.cankaoxiaoxi.com/templates/cankaoxiaoxi/css/img/back_tt.png‘) no-repeat 0px 5px; background-size:auto 50px; clear:both; margin-left:5px; position:relative;}
.list img {width:45px; height:45px; margin:8px 10px 8px 2px; float:left; border:none;}
.list li a{color:#000000; font-size:16px; font-family:"微软雅黑"; line-height:58px; margin-left:3px; list-style:none; margin-left:10px;}
.list li a:first-child {margin:0;}
.list li span { font-size:13px; color:#FFFFFF; font-family:"黑体"; margin-left:5px; }
.list li span.num{ font-size:13px; color:#999; font-family:"黑体"; margin-left:15px; margin-top:25px; position:absolute; right:1445px;}
.list li div{margin-left:10px;}
.list li div:last-child {color:#999; font-size:13px; font-family:"微软雅黑"; margin-height:58px; margin-top:-35px; margin-left:470px;}
</style>
<!--要闻 start-->
<div>
<div class="pindao">
<ul class="list">
<li>
<a href="javascript:;" title="世界杯球衣上为何没广告?" onm ouseup="show(1)" onm ousedown="change(1)"><img srchttp://www.mamicode.com/= "http://img.cankaoxiaoxi.com/templates/cankaoxiaoxi/css/img/bofang.png" /></a>
<span>044期</span>
<a href="javascript:;" onclick="show(1)" title="世界杯球衣上为何没广告?">世界杯球衣上为何没广告?</a>
<span class="num"> 已点次数:</span>
<div style="margin: 10px 0 0 0; clear:both;display:none;" id="1"><audio src="" autoplay="autoplay" ontimeupdate="update(1)" onended="end(1)" one rror = "this.load();"></audio></div>
<div style="width:100px; height:100px; position:absolute; top:39px; left:48px; "><img srchttp://www.mamicode.com/= "http://img.cankaoxiaoxi.com/templates/cankaoxiaoxi/css/img/len_tt.png" style ="width:0px; height:8px; border-radius:10px;"></div>
<div> </div>
</li>
<li>
<a href="javascript:;" title="广场舞大妈正“占领地球”" onm ouseup="show(2)" onm ousedown="change(2)"><img srchttp://www.mamicode.com/= "http://img.cankaoxiaoxi.com/templates/cankaoxiaoxi/css/img/bofang.png" /></a>
<span>043期</span>
<a href="javascript:;" onclick="show(2)" title="广场舞大妈正“占领地球”">广场舞大妈正“占领地球”</a>
<span class="num"> 已点次数:</span>
<div style="margin: 10px 0 0 0; clear:both;display:none;" id="2"><audio src="" autoplay="autoplay" ontimeupdate="update(2)" onended="end(2)" one rror = "this.load();"></audio></div>
<div style="width:100px; height:100px; position:absolute; top:39px; left:48px; "><img srchttp://www.mamicode.com/= "http://img.cankaoxiaoxi.com/templates/cankaoxiaoxi/css/img/len_tt.png" style ="width:0px; height:8px; border-radius:10px;"></div>
<div> </div>
</li>
<li>
<a href="javascript:;" title=""世界第一辣酱"到底有多辣" onm ouseup="show(3)" onm ousedown="change(3)"><img srchttp://www.mamicode.com/= "http://img.cankaoxiaoxi.com/templates/cankaoxiaoxi/css/img/bofang.png" /></a>
<span>042期</span>
<a href="javascript:;" onclick="show(3)" title=""世界第一辣酱"到底有多辣">"世界第一辣酱"到底有多辣</a>
<span class="num">已点次数:</span>
<div style="margin: 10px 0 0 0; clear:both;display:none;" id="3"><audio src="" autoplay="autoplay" ontimeupdate="update(3)" onended="end(3)" one rror = "this.load();"></audio></div>
<div style="width:100px; height:100px; position:absolute; top:39px; left:48px; "><img srchttp://www.mamicode.com/= "http://img.cankaoxiaoxi.com/templates/cankaoxiaoxi/css/img/len_tt.png" style ="width:0px; height:8px; border-radius:10px;"></div>
<div> </div>
</li>
<li>
<a href="javascript:;" title="在厨房清洗鸡肉易传播细菌" onm ouseup="show(4)" onm ousedown="change(4)"><img srchttp://www.mamicode.com/= "http://img.cankaoxiaoxi.com/templates/cankaoxiaoxi/css/img/bofang.png" /></a>
<span>041期</span>
<a href="javascript:;" onclick="show(4)" title="在厨房清洗鸡肉易传播细菌">在厨房清洗鸡肉易传播细菌</a>
<span class="num"> 已点次数:</span>
<div style="margin: 10px 0 0 0; clear:both;display:none;" id="4"><audio src="" autoplay="autoplay" ontimeupdate="update(4)" onended="end(4)" one rror = "this.load();"></audio></div>
<div style="width:100px; height:100px; position:absolute; top:39px; left:48px; "><img srchttp://www.mamicode.com/= "http://img.cankaoxiaoxi.com/templates/cankaoxiaoxi/css/img/len_tt.png" style ="width:0px; height:8px; border-radius:10px;"></div>
<div> </div>
</li>
<li>
<a href="javascript:;" title="声音亦可调味,你信吗?" onm ouseup="show(5)" onm ousedown="change(5)"><img srchttp://www.mamicode.com/= "http://img.cankaoxiaoxi.com/templates/cankaoxiaoxi/css/img/bofang.png" /></a>
<span>040期</span>
<a href="javascript:;" onclick="show(5)" title="声音亦可调味,你信吗?">声音亦可调味,你信吗?</a>
<span class="num"> 已点次数:</span>
<div style="margin: 10px 0 0 0; clear:both;display:none;" id="5"><audio src="" autoplay="autoplay" ontimeupdate="update(5)" onended="end(5)" one rror = "this.load();"></audio></div>
<div style="width:100px; height:100px; position:absolute; top:39px; left:48px; "><img srchttp://www.mamicode.com/= "http://img.cankaoxiaoxi.com/templates/cankaoxiaoxi/css/img/len_tt.png" style ="width:0px; height:8px; border-radius:10px;"></div>
<div> </div>
</li>
<li>
<a href="javascript:;" title="巴西世界杯的“中国元素”" onm ouseup="show(6)" onm ousedown="change(6)"><img srchttp://www.mamicode.com/= "http://img.cankaoxiaoxi.com/templates/cankaoxiaoxi/css/img/bofang.png" /></a>
<span>039期</span>
<a href="javascript:;" onclick="show(6)" title="巴西世界杯的“中国元素”">巴西世界杯的“中国元素”</a>
<span class="num"> 已点次数:</span>
<div style="margin: 10px 0 0 0; clear:both;display:none;" id="6"><audio src="" autoplay="autoplay" ontimeupdate="update(6)" onended="end(6)" one rror = "this.load();"></audio></div>
<div style="width:100px; height:100px; position:absolute; top:39px; left:48px; "><img srchttp://www.mamicode.com/= "http://img.cankaoxiaoxi.com/templates/cankaoxiaoxi/css/img/len_tt.png" style ="width:0px; height:8px; border-radius:10px;"></div>
<div> </div>
</li>
<li>
<a href="javascript:;" title=""瘫痪钢铁侠"为世界杯开球" onm ouseup="show(7)" onm ousedown="change(7)"><img srchttp://www.mamicode.com/= "http://img.cankaoxiaoxi.com/templates/cankaoxiaoxi/css/img/bofang.png" /></a>
<span>038期</span>
<a href="javascript:;" onclick="show(7)" title=""瘫痪钢铁侠"为世界杯开球">"瘫痪钢铁侠"为世界杯开球</a>
<span class="num"> 已点次数:</span>
<div style="margin: 10px 0 0 0; clear:both;display:none;" id="7"><audio src="" autoplay="autoplay" ontimeupdate="update(7)" onended="end(7)" one rror = "this.load();"></audio></div>
<div style="width:100px; height:100px; position:absolute; top:39px; left:48px; "><img srchttp://www.mamicode.com/= "http://img.cankaoxiaoxi.com/templates/cankaoxiaoxi/css/img/len_tt.png" style ="width:0px; height:8px; border-radius:10px;"></div>
<div> </div>
</li>
<li>
<a href="javascript:;" title="中国人海外旅行分三派" onm ouseup="show(8)" onm ousedown="change(8)"><img srchttp://www.mamicode.com/= "http://img.cankaoxiaoxi.com/templates/cankaoxiaoxi/css/img/bofang.png" /></a>
<span>037期</span>
<a href="javascript:;" onclick="show(8)" title="中国人海外旅行分三派">中国人海外旅行分三派</a>
<span class="num">已点次数:</span>
<div style="margin: 10px 0 0 0; clear:both;display:none;" id="8"><audio src="" autoplay="autoplay" ontimeupdate="update(8)" onended="end(8)" one rror = "this.load();"></audio></div>
<div style="width:100px; height:100px; position:absolute; top:39px; left:48px; "><img srchttp://www.mamicode.com/= "http://img.cankaoxiaoxi.com/templates/cankaoxiaoxi/css/img/len_tt.png" style ="width:0px; height:8px; border-radius:10px;"></div>
<div> </div>
</li>
<li>
<a href="javascript:;" title="世界杯催生“假病假条”" onm ouseup="show(9)" onm ousedown="change(9)"><img srchttp://www.mamicode.com/= "http://img.cankaoxiaoxi.com/templates/cankaoxiaoxi/css/img/bofang.png" /></a>
<span>036期</span>
<a href="javascript:;" onclick="show(9)" title="世界杯催生“假病假条”">世界杯催生“假病假条”</a>
<span class="num"> 已点次数:</span>
<div style="margin: 10px 0 0 0; clear:both;display:none;" id="9"><audio src="" autoplay="autoplay" ontimeupdate="update(9)" onended="end(9)" one rror = "this.load();"></audio></div>
<div style="width:100px; height:100px; position:absolute; top:39px; left:48px; "><img srchttp://www.mamicode.com/= "http://img.cankaoxiaoxi.com/templates/cankaoxiaoxi/css/img/len_tt.png" style ="width:0px; height:8px; border-radius:10px;"></div>
<div> </div>
</li>
<li>
<a href="javascript:;" title="德国电视问答求助默克尔" onm ouseup="show(10)" onm ousedown="change(10)"><img srchttp://www.mamicode.com/= "http://img.cankaoxiaoxi.com/templates/cankaoxiaoxi/css/img/bofang.png" /></a>
<span>035期</span>
<a href="javascript:;" onclick="show(10)" title="德国电视问答求助默克尔">德国电视问答求助默克尔</a>
<span class="num"> 已点次数:</span>
<div style="margin: 10px 0 0 0; clear:both;display:none;" id="10"><audio src="" autoplay="autoplay" ontimeupdate="update(10)" onended="end(10)" one rror = "this.load();"></audio></div>
<div style="width:100px; height:100px; position:absolute; top:39px; left:48px; "><img srchttp://www.mamicode.com/= "http://img.cankaoxiaoxi.com/templates/cankaoxiaoxi/css/img/len_tt.png" style ="width:0px; height:8px; border-radius:10px;"></div>
<div> </div>
</li>
</ul>
<!-- 分页 -->
<!-- <div class="page center mar-b-10 ov">
<ul>
<li><a href="javascript:void(0);" class="prev disable">上一页</a></li><li><a href="javascript:void(0);" class="now">1</a></li><li><a href="http://m.cankaoxiaoxi.com/listener/2.shtml">2</a></li><li><a href="http://m.cankaoxiaoxi.com/listener/3.shtml">3</a></li><li><a href="http://m.cankaoxiaoxi.com/listener/4.shtml">4</a></li><li><a href="http://m.cankaoxiaoxi.com/listener/5.shtml">5</a></li><li><a href="http://m.cankaoxiaoxi.com/listener/2.shtml" class="next">下一页</a></li> </ul>
</div>
-->
</div>
</div>
<!--要闻 end-->
<script >
var aSrc =http://www.mamicode.com/new Array();
aSrc[0] =‘http://upload.cankaoxiaoxi.com/2014/0621/1403318412835.mp3‘;
aSrc[1] =‘http://upload.cankaoxiaoxi.com/2014/0620/1403226549723.mp3‘;
aSrc[2] =‘http://upload.cankaoxiaoxi.com/2014/0619/1403139780941.mp3‘;
aSrc[3] =‘http://upload.cankaoxiaoxi.com/2014/0618/1403076818459.mp3‘;
aSrc[4] =‘http://upload.cankaoxiaoxi.com/2014/0617/1402967432137.mp3‘;
aSrc[5] =‘http://upload.cankaoxiaoxi.com/2014/0616/1402879960740.mp3‘;
aSrc[6] =‘http://upload.cankaoxiaoxi.com/2014/0612/1402535374265.mp3‘;
aSrc[7] =‘http://upload.cankaoxiaoxi.com/2014/0611/1402453893759.mp3‘;
aSrc[8] =‘http://upload.cankaoxiaoxi.com/2014/0611/1402448890365.mp3‘;
aSrc[9] =‘http://upload.cankaoxiaoxi.com/2014/0608/1402204423187.mp3‘;
var arr = new Array()
var oUl = document.getElementsByTagName(‘ul‘);
for (j=0;j<oUl[0].children.length; j++){
arr[j]= 0;}
function end(p){
var oUl = document.getElementsByTagName(‘ul‘);
var oDiv = oUl[0].children[p-1].children[5];
var oMus = oUl[0].children[p-1].children[4];
var oImg = oUl[0].children[p-1].children[0];
oImg.innerHTML = ‘<img src="http://img.cankaoxiaoxi.com/templates/cankaoxiaoxi/css/img/bofang.png" />‘;
oDiv.children[0].style.width = "230px";
}
function update(p){
var oUl = document.getElementsByTagName(‘ul‘);
var oDiv = oUl[0].children[p-1].children[5];
var oMus = oUl[0].children[p-1].children[4];
var oImg = oUl[0].children[p-1].children[0];
var oDu = oMus.children[0].duration;
oDu = oDu>51?oDu:55;
var oCu = oMus.children[0].currentTime;
var len = oCu*230.0;
var len = len/oDu;
var lenc = len+"px";
oDiv.children[0].style.width = lenc;
}
//var x=0;
function show(p){
var oUl = document.getElementsByTagName(‘ul‘);
var oMus = oUl[0].children[p-1].children[4];
var oImg = oUl[0].children[p-1].children[0];
if(oMus.style.display == "none")
{
for(var i=0; i<oUl[0].children.length; i++){
//alert(123);
oUl[0].children[i].children[4].style.display = "none";
oUl[0].children[i].children[4].children[0].pause();
oUl[0].children[i].children[0].innerHTML = ‘<img src="http://img.cankaoxiaoxi.com/templates/cankaoxiaoxi/css/img/bofang.png" />‘;
}
oMus.style.display = "block";
if(oMus.children[0].src!=aSrc[p-1]&&aSrc[p-1]){oMus.children[0].src = http://www.mamicode.com/aSrc[p-1]; }
oMus.children[0].play();
oImg.innerHTML = ‘<img src="http://img.cankaoxiaoxi.com/templates/cankaoxiaoxi/css/img/zanting.png" />‘;
setTimeout(reload(p),1200);
//oUl[0].children[p-1].style.height=‘115px‘;
// x=x+1;
arr[p-1]++;
var mm=oUl[0].children[p-1].children[6];
mm.innerHTML = arr[p-1];
}
else
{
oMus.style.display = "none";
oImg.innerHTML = ‘<img src="http://img.cankaoxiaoxi.com/templates/cankaoxiaoxi/css/img/bofang.png" />‘;
oMus.children[0].pause();
//oUl[0].children[p-1].style.height=‘58px‘;
}
}
function change(p){
var oUl = document.getElementsByTagName(‘ul‘);
var oMus = oUl[0].children[p-1].children[4];
var oImg = oUl[0].children[p-1].children[0]
if(oMus.style.display == "none")
{
//oMus.style.display = "block";
//if(oMus.children[0].src!=aSrc[p-1]){oMus.children[0].src = http://www.mamicode.com/aSrc[p-1]; }
//oMus.children[0].play();
oImg.innerHTML = ‘<img src="http://img.cankaoxiaoxi.com/templates/cankaoxiaoxi/css/img/bofang2.png" />‘;
//oUl[0].children[p-1].style.height=‘115px‘;
}
else
{
//oMus.style.display = "none";
oImg.innerHTML = ‘<img src="http://img.cankaoxiaoxi.com/templates/cankaoxiaoxi/css/img/zanting2.png" />‘;
//oMus.children[0].srchttp://www.mamicode.com/= "";
//oUl[0].children[p-1].style.height=‘58px‘;
}
}
function accDiv(arg1,arg2){
var t1=0,t2=0,r1,r2;
try{t1=arg1.toString().split(".")[1].length}catch(e){}
try{t2=arg2.toString().split(".")[1].length}catch(e){}
with(Math){
r1=Number(arg1.toString().replace(".",""))
r2=Number(arg2.toString().replace(".",""))
return (r1/r2)*pow(10,t2-t1);
}
}
function accMul(arg1,arg2)
{
var m=0,s1=arg1.toString(),s2=arg2.toString();
try{m+=s1.split(".")[1].length}catch(e){}
try{m+=s2.split(".")[1].length}catch(e){}
return Number(s1.replace(".",""))*Number(s2.replace(".",""))/Math.pow(10,m)
}
function reload(p){
var oUl = document.getElementsByTagName(‘ul‘);
var oMus = oUl[0].children[p-1].children[4];
var oImg = oUl[0].children[p-1].children[0];
if(oMus.children[0].currentTime<1.0){
var oDu = oMus.children[0].load();
}
}
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;
var num_show = parseInt(oUl[0].children[num-1].children[1].innerHTML);
// alert (num);
// alert(oUl[0].children[0]);
$.getJSON("http://app.cankaoxiaoxi.com/?app=system&controller=channel_tt&action=index&catid=305&size=5&num=" + num +"&jsoncallback=?", function(data){
if(data)
{
//var oUl = document.getElementsByTagName(‘ul‘);
for(var elem in data){
num_show--;
if(num_show<10) num_show="00"+num_show;
else if(num_show<100) num_show="0"+num_show;
num++;
aSrc[num-1]=data[elem].url;
oUl[0].innerHTML=oUl[0].innerHTML+"<li><a href=‘javascript:;‘ title=‘"+data[elem].title+"‘ onm ouseup=‘show("+num+")‘ onm ousedown=‘change("+num+")‘><img src = http://www.mamicode.com/‘http://img.cankaoxiaoxi.com/templates/cankaoxiaoxi/css/img/bofang.png‘ />"+num_show+"期</span><a href=‘javascript:;‘ onclick=‘show("+num+")‘ title=‘" + data[elem].title + "‘>" + data[elem].title + "</a><div style=‘margin: 10px 0 0 0; clear:both;display:none;‘ id=‘"+num+"‘><audio src=http://www.mamicode.com/‘‘ autoplay=‘autoplay‘ ontimeupdate=‘update("+num+")‘ onended=‘end("+num+")‘ one rror = ‘this.load();‘></audio></div><div style=‘width:100px; height:100px; position:absolute; top:39px; left:48px; ‘><img src = http://www.mamicode.com/‘http://img.cankaoxiaoxi.com/templates/cankaoxiaoxi/css/img/len_tt.png‘ style =‘width:0px; height:8px; border-radius:10px;‘>
}
}
});
}
}
</script>
<script type="text/javascript">
var _bdhmProtocol = (("https:" == document.location.protocol) ? " https://" : " http://");
document.write(unescape("%3Cscript src=http://www.mamicode.com/‘" + _bdhmProtocol + "hm.baidu.com/h.js%3F308b87570281daa02f0d31c085c39163‘ type=‘text/javascript‘%3E%3C/script%3E"));
</script>
</body>
</html>
cktt点击次数代码