注册 登录  
 加关注
   显示下一条  |  关闭
温馨提示!由于新浪微博认证机制调整,您的新浪微博帐号绑定已过期,请重新绑定!立即重新绑定新浪微博》  |  关闭

曹宏安的网易博客

潸然看断梨花落

 
 
 

日志

 
 

引用 网页内嵌播放器歌词同步显示代码   

2014-07-28 18:31:21|  分类: 博客制作 |  标签: |举报 |字号 订阅

  下载LOFTER 我的照片书  |

<html>
<head>


<STYLE type=text/css>
TD { FONT-SIZE: 9pt; LINE-HEIGHT: 20px; }
BODY{
FONT-SIZE: 9pt;
LINE-HEIGHT: 10px;
}
#lrcollbox td, #lrcollbox font {font-family: arial; font-size: 15px;}
#lrcoll td { color:#0040a0; cursor: default; }
#lrcbox { color:#212021 }
#lrcfilter { filter: alpha(opacity=0) }
#lrcbc { color:#FF0000 }
</STYLE>
</head>
<script language="JavaScript">
self.moveTo(0,0);
self.resizeTo(screen.availWidth,screen.availHeight);
</script>
<body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
<span id="lrcdata"><!--
[ti:爱上你是一个错]
[ar:杨培安]
[al:午夜两点半的我]
[by:baiyishg]
[00:05.00]陈湘制作QQ:123154129
[01:37.30][00:15.03]人生有许多难关要过
[01:41.90][00:20.61]自古是情关最让人难受
[01:45.52][00:24.07]也许我命中注定情海中颠簸
[01:52.82][00:31.23]为你我付出这么的多
[01:58.37][00:36.89]却让我痛到有苦不能说
[02:01.99][00:40.66]因为我爱你就像那飞蛾扑向火
[02:09.12][00:47.73]请你告诉我爱上你是一个错
[02:13.84][00:52.37]别让我失魂落魄遭了魔
[02:18.35][00:56.96]解开我的迷惑 收起你的冷漠
[02:22.96][01:01.61]别在任性这样做
[02:26.04][01:04.67]请你告诉我爱上你是一个错
[02:30.40][01:09.43]别让我漫漫长夜守寂寞
[02:34.63][01:13.50]伤痛已经太多 心也早已伤透 
[02:39.23][01:17.91]我已不想再为谁 去软弱 噢~
[01:31.32]杨培安-爱上你是一个错
[02:45.53]请你告诉我爱上你是一个错
[02:50.74]别让我失魂落魄遭了魔
[02:55.00]解开我的迷惑 收起你的冷漠
[02:59.60]别在任性这样做
[03:02.58]请你告诉我爱上你是一个错
[03:07.01]别让我漫漫长夜守寂寞
[03:11.21]伤痛已经太多 心也早已伤透 
[03:15.97]我已不想再为谁
[03:18.96]去软弱 噢~哦~
[03:28.23]我的QQ:1296602203
--></span>
<center>
<object classid="clsid:6bf52a52-394a-11d3-b153-00c04f79faa6" id="aboutplayer" width="300" height="80">
<param name="url" value="http://www.hqnano.com/mp3/asnjwdc.mp3">
<param name="volume" value="100">
<param name="enablecontextmenu" value="0">
<param name="enableerrordialogs" value="0">
</object>
<div id="lrcollbox" style="overflow:hidden; height:300; width:300; background-color:#adef8c;">
<table border="0" cellspacing="0" cellpadding="0" width="100%" id="lrcoll" style="position:relative; top: -15px;" oncontextmenu="return false;">


<tr><td nowrap height="20" align="center" id="lrcwt1"></td></tr>
<tr><td nowrap height="20" align="center" id="lrcwt2"></td></tr>
<tr><td nowrap height="20" align="center" id="lrcwt3"></td></tr>
<tr><td nowrap height="20" align="center" id="lrcwt4"></td></tr>
<tr><td nowrap height="20" align="center" id="lrcwt5"></td></tr>
<tr><td nowrap height="20" align="center">
<table border="0" cellspacing="0" cellpadding="0">
<tr><td nowrap height="16"><span id="lrcwt6" style="height:16"></span></td></tr>
<tr style="position:relative; top: -20px; z-index:6"><td nowrap height="16"><div id="lrcfilter" style="overflow:hidden; width:100%; color:#0040a0; height:16"></div></td></tr>
</table>
</td></tr>
<tr style="position:relative; top: -15px"><td nowrap height="20" align="center">
<table border="0" cellspacing="0" cellpadding="0">
<tr><td nowrap height="16"><span id="lrcbox" style="height:16"></span></td></tr>
<tr style="position:relative; top: -20px; z-index:6;"><td nowrap height="16"><div id="lrcbc" style="overflow:hidden; height:16; width:0;"></div></td></tr>
</table>
</td></tr>
<tr style="position:relative; top: -20px;"><td nowrap height="20" align="center" id="lrcwt7"></td></tr>
<tr style="position:relative; top: -20px;"><td nowrap height="20" align="center" id="lrcwt8"></td></tr>
<tr style="position:relative; top: -20px;"><td nowrap height="20" align="center" id="lrcwt9"></td></tr>
<tr style="position:relative; top: -20px;"><td nowrap height="20" align="center" id="lrcwt10"></td></tr>
</table>
</div>
</center>
<script language="JavaScript">
var lrc0;
var lrc1;
var min;
lrcobj = new lrcClass(lrcdata.innerHTML.slice(4,-3));


function lrcClass(tt)
{
  this.inr = [];
  this.min = [];


  this.oTime = 0;


  this.dts = -1;
  this.dte = -1;
  this.dlt = -1;
  this.ddh;
  this.fjh;


  lrcbc.style.width = 0;
 
  tt = tt.replace(/\[\:\][^$\n]*(\n|$)/g,"$1");
  tt = tt.replace(/\[[^\[\]\:]*\]/g,"");
  tt = tt.replace(/\[[^\[\]]*[^\[\]\d]+[^\[\]]*\:[^\[\]]*\]/g,"");
  tt = tt.replace(/\[[^\[\]]*\:[^\[\]]*[^\[\]\d\.]+[^\[\]]*\]/g,"");
  tt = tt.replace(/<[^<>]*[^<>\d]+[^<>]*\:[^<>]*>/g,"");
  tt = tt.replace(/<[^<>]*\:[^<>]*[^<>\d\.]+[^<>]*>/g,"");


  while(/\[[^\[\]]+\:[^\[\]]+\]/.test(tt))
  {
    tt = tt.replace(/((\[[^\[\]]+\:[^\[\]]+\])+[^\[\r\n]*)[^\[]*/,"\n");
    var zzzt = RegExp.$1;
    /^(.+\])([^\]]*)$/.exec(zzzt);
    var ltxt = RegExp.$2;
    var eft = RegExp.$1.slice(1,-1).split("][");
    for(var ii=0; ii<eft.length; ii++)
    {
      var sf = eft[ii].split(":");
      var tse = parseInt(sf[0],10) * 60 + parseFloat(sf[1]);
      var sso = { t:[] , w:[] , n:ltxt }
      sso.t[0] = tse-this.oTime;
      this.inr[this.inr.length] = sso;
    }
  }
  this.inr = this.inr.sort( function(a,b){return a.t[0]-b.t[0];} );


  for(var ii=0; ii<this.inr.length; ii++)
  {
    while(/<[^<>]+\:[^<>]+>/.test(this.inr[ii].n))
    {
      this.inr[ii].n = this.inr[ii].n.replace(/<(\d+)\:([\d\.]+)>/,"%=%");
      var tse = parseInt(RegExp.$1,10) * 60 + parseFloat(RegExp.$2);
      this.inr[ii].t[this.inr[ii].t.length] = tse-this.oTime;
    }
    lrcbc.innerHTML = "<font>"+ this.inr[ii].n.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/%=%/g,"</font><font>") +"</font>";
    var fall = lrcbc.getElementsByTagName("font");
    for(var wi=0; wi<fall.length; wi++)
      this.inr[ii].w[this.inr[ii].w.length] = fall[wi].offsetWidth;
    this.inr[ii].n = lrcbc.innerText;
  }


  for(var ii=0; ii<this.inr.length-1; ii++)
    this.min[ii] = Math.floor((this.inr[ii+1].t[0]-this.inr[ii].t[0])*10);
  this.min.sort(function(a,b){return a-b});
  min = this.min[0]/2;


  this.run = function(tme)
  {
    if(tme<this.dts || tme>=this.dte)
    {
      var ii;
      for(ii=this.inr.length-1; ii>=0 && this.inr[ii].t[0]>tme; ii--){}
      if(ii<0) return;
      this.ddh = this.inr[ii].t;
      this.fjh = this.inr[ii].w;
      this.dts = this.inr[ii].t[0];
      this.dte = (ii<this.inr.length-1)?this.inr[ii+1].t[0]:aboutplayer.currentMedia.duration;
 
      lrcwt1.innerText = this.retxt(ii-6);
      lrcwt2.innerText = this.retxt(ii-5);
      lrcwt3.innerText = this.retxt(ii-4);
      lrcwt4.innerText = this.retxt(ii-3);
      lrcwt5.innerText = this.retxt(ii-2);
      lrcwt6.innerText = this.retxt(ii-1);
      lrcfilter.innerText = this.retxt(ii-1);
      lrcwt7.innerText = this.retxt(ii+1);
      lrcwt8.innerText = this.retxt(ii+2);
      lrcwt9.innerText = this.retxt(ii+3);
      lrcwt10.innerText = this.retxt(ii+4);
     
      this.print(this.retxt(ii));
      if(this.dlt==ii-1)
      {
        clearTimeout(lrc0);
        if(lrcoll.style.pixelTop!=0) lrcoll.style.top = 0;
        golrcoll(0);
        clearTimeout(lrc1);
        lrcfilter.filters.alpha.opacity = 100;
        golrcolor(0);
      }
      else if(parseInt(lrcoll.style.top)!=-20)
      {
        clearTimeout(lrc0);
        lrcoll.style.top = -20;
        clearTimeout(lrc1);
        lrcfilter.filters.alpha.opacity = 0;
      }
      this.dlt = ii;
    }
    var bbw = 0;
    var ki;
    for(ki=0; ki<this.ddh.length && this.ddh[ki]<=tme; ki++)
      bbw += this.fjh[ki];
    var kt = ki-1;
    var sc = ((ki<this.ddh.length)?this.ddh[ki]:this.dte) - this.ddh[kt];
    var tc = tme - this.ddh[kt];
    bbw -= this.fjh[kt] - tc / sc * this.fjh[kt];
    if(bbw>lrcbox.offsetWidth)
      bbw = lrcbox.offsetWidth;
    lrcbc.style.width = Math.round(bbw);
  }


  this.retxt = function(i)
  {
    return (i<0 || i>=this.inr.length)?"":this.inr[i].n;
  }


  this.print = function(txt)
  {
    lrcbox.innerText = txt;
    lrcbc.innerText = txt;
  }


  this.print("518酷博客音乐");
  var a=new Array("lrcwt1","lrcwt2","lrcwt3","lrcwt4","lrcwt5","lrcwt6","lrcwt7","lrcwt8","lrcwt9","lrcwt10","lrcwt11")
  for(var b=0;b<11;b++)a[b].innerText = "";
  }


function lrcrun()
{
  with(aboutplayer)
  {
    lrcobj.run(controls.currentPosition);
  }
  if(arguments.length==0) setTimeout("lrcrun()",10);
}


function golrcoll(s)
{
  lrcoll.style.top = -(s++)*2;
  if(s<=9)
    lrc0 = setTimeout("golrcoll("+s+")",min*10);
}


function golrcolor(t)
{
  lrcfilter.filters.alpha.opacity = 110-(t++)*10;
  if(t<=10)
    lrc1 = setTimeout("golrcolor("+t+")",min*10);
}
window.onerror = function()
{return true;}
lrcrun();
</script>
</body></html>

  评论这张
 
阅读(1)| 评论(0)
推荐 转载

历史上的今天

在LOFTER的更多文章

评论

<#--最新日志,群博日志--> <#--推荐日志--> <#--引用记录--> <#--博主推荐--> <#--随机阅读--> <#--首页推荐--> <#--历史上的今天--> <#--被推荐日志--> <#--上一篇,下一篇--> <#-- 热度 --> <#-- 网易新闻广告 --> <#--右边模块结构--> <#--评论模块结构--> <#--引用模块结构--> <#--博主发起的投票-->
 
 
 
 
 
 
 
 
 
 
 
 
 
 

页脚

网易公司版权所有 ©1997-2017