當前位置:編程學習大全網 - 源碼下載 - html調用lrc

html調用lrc

<HTML><HEAD><TITLE>MP3試聽</TITLE>

<META /imgs/bdbg.gif);background-repeat:repeat-x;margin:0;font-size:12px;font-family:SimSun}

img{border:0}

a{color:#00c}

#Head_div {height:60px;width:400px}

#Usr_div {float:right;margin:30px 20px 10px;width:350px}

#Usr_div {margin:30px 0 10px 20px;width:190px}

#Logo_div {margin:13px 0 10px 3px;width:145px;float:left;}

#Lrc_div {position:absolute;width:350px;height:100%;float:left;margin-top:-60px;margin-left:8px;}

#url_div {margin:30px 10px 22px 5px;width:350px}

#song_div {margin:5px 10px 5px 5px}

#S_div {background:#E0E6F7;border:1px solid #A0BACD;width:350px;margin-bottom:10px}

#SongNum_div {clear:both}

#plus_div {float:left;background:url(/imgs/cd.gif) no-repeat 10px;padding:10px 30px;text-decoration:underline;color:blue;}

#next_div {float:right;background:url(/imgs/next.gif) no-repeat 1px 10px;padding:10px 15px;text-decoration:underline;color:blue;}

#pre_div {float:right;background:url(/imgs/pre.gif) no-repeat 1px 10px;padding:10px 15px;text-decoration:underline;color:blue;}

#InP_div {margin:2px;clear:both}

#arrowright_div {float:left;height:500px;width:10px;}

#arrowright_div img {position:absolute;top:85px;left:0;cursor:pointer;}

#rightIfrm_div {float:left;width:420px;margin-top:-60px}

#MngIfrm_div {}

#leftAd_div {width:350px;float:left;margin-left:10px;margin-top:420px;}

</STYLE>

</HEAD>

<script src="/js/bd_syncLRC.js"></script>

<script language="VBScript">

Function bdBytes2Str(vIn)

strReturn = ""

For i = 1 To LenB(vIn)

ThisCharCode = AscB(MidB(vIn,i,1))

If ThisCharCode < &H80 Then

strReturn = strReturn & Chr(ThisCharCode)

Else

NextCharCode = AscB(MidB(vIn,i+1,1))

strReturn = strReturn & Chr(CLng(ThisCharCode) * &H100 + CInt(NextCharCode))

i = i + 1

End If

Next

bdBytes2Str = strReturn

End Function

</script>

<BODY>

<div id="Head_div">

<div id="Logo_div">?</div>

<div id="Usr_div">?</div>

</div>

<div id="arrowright_div">

<img src="/imgs/arrowright1.gif" id="Res_div" alt="隱藏音樂盒" onclick="reWin()" style="filter:fliph" />

</div>

<div id="rightIfrm_div" style="display:none">

<div id="MngIfrm_div" style="display:none">

<iframe id="try_iframe" name="try_iframe" src="" align="top" width="100%" height="512px" marginwidth="0" marginheight="0" frameborder="0" scrolling="no"></iframe>

</div>

<div style="display:none" id="leftAd_div"></div>

</div>

<script language="javascript" type="text/javascript">

var txtEp="展開音樂盒";

var txtTb="隱藏音樂盒";

var isLoadIf = false; //是否已加載

var try_iframe = window.frames[0];

var search_location = window.location.href;

var ext_mb = false; //是否需要展開

var is_ext_mb = false; //是否已經展開

var woffset = 0;

//if(!(document.body.clientWidth >= 380 && document.body.clientWidth <= 404) && !(document.body.clientWidth >= 795 && document.body.clientWidth <= 815)) woffset = 30;

if(search_location.indexOf("gate=2") > 0 || search_location.indexOf("gate=5") > 0) ext_mb = true;

function reWin() {

var mngIfrm_div = document.getElementById("MngIfrm_div");

var rightIfrm_div = document.getElementById("rightIfrm_div");

var res_div = document.getElementById("Res_div");

if(mngIfrm_div.style.display!="none") {

mngIfrm_div.style.display="none";

res_div.src="/imgs/arrowright1.gif";

res_div.style.filter="fliph";

res_div.alt=txtEp;

is_ext_mb = false;

if(hasAds) { //有廣告

if(hasLrc) { //有歌詞

res_div.style.marginLeft="420px";

rightIfrm_div.style.display="inline";

} else { //無歌詞

rightIfrm_div.style.display="none";

res_div.style.marginLeft="0px";

showAdRight(arrBaiduAds[18]);

document.getElementById("Lrc_div").style.marginLeft = "8";

window.moveTo((screen.width - 399) / 2, 0);

window.resizeTo(399 + woffset, 600);

}

} else { //無廣告

rightIfrm_div.style.display="none";

document.getElementById("Lrc_div").style.marginLeft = "8";

window.moveTo((screen.width - 399) / 2, 0);

window.resizeTo(399 + woffset, 600);

}

} else {

document.getElementById("Lrc_div").style.marginLeft = "3";

//window.moveBy(-421,0);

if(screen.width > 800) window.moveTo(100, 0); else window.moveTo(0, 0);

window.resizeTo(810 + woffset, 600);

mngIfrm_div.style.display="inline";

rightIfrm_div.style.display="inline";

if(!isLoadIf) {

search_location = search_location.replace("baidumt", "baidubox");

document.getElementById("try_iframe").src= search_location;

try_iframe = window.frames[0];

isLoadIf = true;

}

document.getElementById("Blrc").style.display = "inline";

document.getElementById("LrcShower_div").style.display = "inline";

document.getElementById("lrctellall_div").style.display = "none";

res_div.src="/imgs/arrowright1.gif";

res_div.style.filter="normal";

res_div.style.marginLeft="0px";

res_div.alt=txtTb;

is_ext_mb = true;

}

if(is_ext_mb)

document.getElementById("leftAd_div").style.marginTop = "5px";

else

document.getElementById("leftAd_div").style.marginTop = "230px";;

}

function cclsDiv() {

if(document.getElementById("MngIfrm_div").style.display!="none") {

try_iframe.qaz.value='none'

}

}

function ggetClk() {

try{document.attachEvent("onmouseup",cclsDiv)}

catch (e){document.addEventListener("mouseup",cclsDiv, false)}

}

</script>

<div id="Lrc_div">

<div id="url_div">歌曲出處:<a id="song_url" href="/activex/controls/mplayer/en/nsmp2inf.cab#Version=6,4,5,715"

align="baseline" border="0" standby="Loading Microsoft Windows Media Player components..."

type="application/x-oleobject">

<param name="invokeURLs" value="0">

<param name="FileName" value="/isapi/redir.dll?prd=windows&sbp=mediaplayer&ar=media&sba=plugin&"

name="MediaPlayer" showcontrols="1" showpositioncontrols="0"

showaudiocontrols="1" showtracker="1" showdisplay="0"

showstatusbar="1"

autosize="0"

showgotobar="0" showcaptioning="0" autostart="1" autorewind="0"

animationatstart="0" transparentatstart="0" allowscan="1"

enablecontextmenu="1" clicktoplay="0"

defaultframe="datawindow" invokeurls="0">

</embed>

</object>

</div>

<div id="SongNum_div">

<div id="plus_div" onclick="if(!isLoadIf) {window.document.getElementById('plus_a').target='mt';reWin();} else {try_iframe.Controller(event);if(!is_ext_mb) reWin();return false;}"><a id="plus_a" style="cursor:hand;">放入我的音樂盒</a></div>

<div id="next_div" onclick="try_iframe.Controller(event);return false;"><a id="next_a" style="cursor:hand;">下壹首</a></div>

<div id="pre_div" onclick="try_iframe.Controller(event);return false;"><a id="pre_a"" style="cursor:hand;">上壹首</a></div>

</div>

</div>

<div style="display:none;clear:both" id="Blrc">

<div style="border:#B4C2E2 1px solid;font-size:12px;text-align:left;width:350px">

<table width="350px" style="background:#ECEDED" cellspacing="0" cellpadding="0"><tr><td style="padding:5px 10px 1px;text-align:left;font-size:12px;"><b>歌詞:</b></td><td style="text-align:right"></td></tr></table>

<div style="display:none;height:276px;width:350px;line-height:20px;overflow-y:scroll;overflow-x:hidden;background:#fff;display:none" id="LrcShower_div"></div>

</div>

</div>

<div style="display:none" id="lrctellall_div"></div>

<div id="InP_div">

<a href="/f?kw=%B0%D9%B6%C8MP3%CA%D4%CC%FD" target="_blank">意見與反饋</a>?<a href="/search/listencopyright.html" target=_blank style="color:#666666">權利聲明</a>

</div>

<!-- script type="text/javascript" src="js/jslog.js"></script> -->

<script>

/*@cc_on @*/

/*@set @dLrc=false @*/

var isFF=(navigator.userAgent.toLowerCase().indexOf("firefox")!=-1)

var hasLrc

var pID=null;

function init(lrcID) {

/*@if (@dLrc)

jslog.info("begin init lrcID=" + lrcID);

@end

@*/

document.onkeydown=function(){if(window.event.keyCode==8){window.event.returnValue=false;}else if(window.event.keyCode>=112&&window.event.keyCode<=123){window.event.keyCode=0;window.event.returnValue = false;};};

document.getElementById("plus_a").contentEditable = false;

document.getElementById("pre_a").contentEditable = false;

document.getElementById("next_a").contentEditable = false;

document.getElementById("plus_div").contentEditable = false;

document.getElementById("pre_div").contentEditable = false;

document.getElementById("next_div").contentEditable = false;

if (isFF) {

document.getElementById("arrowright_div").style.display = "none";

document.getElementById("plus_div").style.display = "none";

document.getElementById("Lrc_div").style.marginRight = "15px";

};

document.getElementById("next_div").style.display = "none";

document.getElementById("pre_div").style.display = "none";

if(document.getElementById('MediaPlayer1')){pID="MediaPlayer1"}

else{

if(document.getElementById('RealPlayer1')){pID="RealPlayer1"}

}

if(lrcID && lrcID != "" && lrcID != "0" && lrcID != 0) {

/*@if (@dLrc)

jslog.info("load lrcID:" + lrcID);

@end

@*/

var re=new RegExp("^[0-9]+$");

var d= lrcID.match(re)

hasLrc=(d!=null&&d!=""&&parseInt(lrcID)>0)

if(!isFF){

if(hasLrc){

document.getElementById('Blrc').style.display="";

document.getElementById('LrcShower_div').style.display="";

if(typeof(lrcInterface)=="function"){

lrcInterface(pID,lrcID);

}else{

document.getElementById('LrcShower_div').innerHTML="<br><br><br><br><br><br><span style='font-size:12px;margin-left:12px'>?可能是因為網絡的原因,系統沒有找到合適的歌詞。請稍後重試</span>";

}

}//end if(hasLrc)

}//end if(!isFF)

} else {

/*@if (@dLrc)

jslog.info("hasLrc = false");

@end

@*/

hasLrc = false;

tmpLrcContent = "";

tmpLrcs = new Array();

document.getElementById('LrcShower_div').innerHTML = "<br><br><br><br><br><br><span style='font-size:12px;margin-left:12px'>?抱歉,系統未找到對應歌詞。";

/*@if (@dLrc)

jslog.info("end init");

@end

@*/

}//if(lrcID)結束

}//init

var reg = new RegExp("(^|&)"+ "si" +"=([^&]*)(&|$)");

var r = window.location.search.substr(1).match(reg);

if (r!=null) {

arrPar = r[0].split(";;")

//alert("r[0]: "+r[0]);

lrcID = arrPar[2];

init(lrcID);

}//if (r!=null)結束

</script>

</div>

<!--廣告-->

<div id="ad_script_div"></div>

<div id="show_flag" style="display:none"></div>

<script src="/js/bd_Adv.js"></script>

</BODY>

</HTML>

  • 上一篇:c語言中getchar的用法舉例有哪些?
  • 下一篇:流動性分析指標有哪些
  • copyright 2024編程學習大全網