隨筆 - 14, 文章 - 39, 評論 - 17, 引用 - 0
          數(shù)據(jù)加載中……

          網(wǎng)頁播放技術(shù)【好代碼】2和3

          <html>
          <head>
          <title>aboutplayer</title>
          <style>
          body {
          ?overflow:auto;
          ?font-size:12px;
          ?cursor:default;
          ?background-color: #977E4A;
          }

          #table01 {
          ?font-size:12px;
          ?background-Color:black;
          ?color:white;
          ?text-align:center;
          }

          #playListTitle {
          ?background-Color:#001122;
          ?color:white;
          ?font-size:12px;
          ?font-weight:bold;
          ?width:100%;
          ?height:16px;
          ?padding:2px;
          }

          #playList {
          ?width:150px;
          ?height:225px;
          ?margin:0px;
          ?font-size:12px;
          ?background-Color:black;
          ?color:white;
          }

          #musicList {
          ?width:200px;
          ?border:buttonface 4px groove;
          ?height:80px;
          ?position:absolute;
          ?right:5px;
          ?top:23px;
          ?left: -1px;
          }

          #musicListTitle {
          ?font-size:13px;
          ?width:100%;
          ?height:20px;
          ?background-Color:#C5FFC5;
          ?padding:3px;
          ?font-weight:bold;
          }

          #musicList a {
          ?text-decoration:none;
          ?width:100%;
          ?height:20px;
          ?line-height:20px;
          ?font-szie:20px;
          ?line-height:20px;
          ?padding-top:5px;
          ?padding-left:10px;
          }

          #musicList a:hover {
          ?background-Color:#E5FFE5;
          }
          .style1 {
          ?color: #006699;
          ?font-weight: bold;
          }
          .style2 {font-size: 12px}
          a:link {
          ?text-decoration: none;
          }
          a:visited {
          ?text-decoration: none;
          }
          a:hover {
          ?text-decoration: none;
          }
          a:active {
          ?text-decoration: none;
          }
          .style4 {font-size: 12px; color: #FFFF33; }
          .style7 {font-family: "Times New Roman", Times, serif}
          </style>
          <script>

          function playList_dragOver(){
          ?event.returnValue=false;
          }

          function playList_dragEnter(){
          ?event.returnValue=false;
          ?event.dataTransfer.dropEffect='link';
          }

          function addMusic(){
          ?if(event.srcElement.tagName=='A'){
          ??strTxt=event.srcElement.innerText;
          ??strURL=event.srcElement.href;
          ??playList.innerHTML="";
          ??playList.options[0]=new Option(strTxt,strURL);
          ??playList.options[0].selected=true;
          ?}
          ?event.returnValue=false;
          ?
          ?playList_dblClick();
          ?return(false);
          }

          function playList_drop(){
          ?strTxt=unescape(event.dataTransfer.getData('Text').split(":")[0]);
          ?strURL=unescape(event.dataTransfer.getData('Text').split(":")[1]);
          ?playList.options[playList.options.length]=new Option(strTxt,strURL);
          }

          function playList_keyDown(){
          ?if(event.keyCode==46){
          ??try{
          ???playList.options[playList.options.selectedIndex].outerHTML="";
          ??}catch(e){}
          ??return(false);
          ?}
          ?if(event.keyCode==13){
          ??playList_dblClick();
          ??return(false);
          ?}
          }

          function playList_dblClick(){
          ?MediaPlayer1.detachEvent("PlayStateChange",checkPlayStatus);
          ?MediaPlayer1.fileName=playList.value;
          ?MediaPlayer1.play();
          ?setTimeout('MediaPlayer1.play();MediaPlayer1.attachEvent("PlayStateChange",checkPlayStatus);',1000);
          }

          function musicList_dragStart(){
          ?if(event.srcElement.tagName=='A'){
          ??event.dataTransfer.setData('Text',escape(event.srcElement.innerText)+":"+escape(event.srcElement.href));
          ?}else{
          ??return(false);
          ?}
          }

          function init(){
          ?MediaPlayer1.AutoRewind=false;
          ?MediaPlayer1.AutoStart=true;
          ?MediaPlayer1.SendPlayStateChangeEvents=true;
          ?MediaPlayer1.attachEvent("PlayStateChange",checkPlayStatus);
          }

          function checkPlayStatus(oldState,newState){
          ?try{
          ??if(MediaPlayer1.PlayState==0){
          ???MediaPlayer1.detachEvent("PlayStateChange",checkPlayStatus);
          ???MediaPlayer1.stop();
          ???if(playList.options.selectedIndex<playList.options.length-1){
          ????playList.options[playList.options.selectedIndex+1].selected=true;
          ???}else{
          ????playList.options[0].selected=true;
          ???}
          ???MediaPlayer1.fileName=playList.value;
          ???MediaPlayer1.play();
          ???setTimeout('MediaPlayer1.play();MediaPlayer1.attachEvent("PlayStateChange",checkPlayStatus);',1000);
          ??}
          ?}catch(e){}
          }
          </script>
          <script>
          function doFull()
          {
          var objId = "MediaPlayer1";
          var funcStr = objId + ".displaySize = 3";
          eval(funcStr);
          }
          </script>
          <meta http-equiv="Content-Type" content="text/html; charset=gb2312"><body onload="init();">
          <table id=table01>
          ?<tr>
          ??<td>
          ???<object classid="clsid:22D6F312-B0F6-11D0-94AB-0080C74C7E95" id="MediaPlayer1" width="286" height="225" STANDBY="Loading Windows Media Player components..." TYPE="application/x-oleobject">
          ????<param name="AudioStream" value="-1">
          ????<param name="AutoSize" value="-1">
          ????<!--是否自動調(diào)整播放大小-->
          ????<param name="AutoStart" value="0">
          ????<!--是否自動播放-->
          ????<param name="AnimationAtStart" value="-1">
          ????<param name="AllowScan" value="-1">
          ????<param name="AllowChangeDisplaySize" value="-1">
          ????<param name="AutoRewind" value="0">
          ????<param name="Balance" value="0">
          ????<!--左右聲道平衡,最左-9640,最右9640-->
          ????<param name="BaseURL" value>
          ????<param name="BufferingTime" value="15">
          ????<!--緩沖時間-->
          ????<param name="CaptioningID" value>
          ????<param name="ClickToPlay" value="-1">
          ????<param name="CursorType" value="0">
          ????<param name="CurrentPosition" value="0">
          ????<!--當(dāng)前播放進(jìn)度 -1 表示不變,0表示開頭 單位是秒,比如10表示從第10秒處開始播放,值必須是-1.0或大于等于0-->
          ????<param name="CurrentMarker" value="0">
          ????<param name="DefaultFrame" value>
          ????<param name="DisplayBackColor" value="0">
          ????<param name="DisplayForeColor" value="16777215">
          ????<param name="DisplayMode" value="0">
          ????<param name="DisplaySize" value="0">
          ????<!--視頻1-50%, 0-100%, 2-200%,3-全屏 其它的值作0處理,小數(shù)則采用四舍五入然后按前的處理-->
          ????<param name="Enabled" value="-1">
          ????<param name="EnableContextMenu" value="1">
          ????<!-是否用右鍵彈出菜單控制-->
          ????<param name="EnablePositionControls" value="-1">
          ????<param name="EnableFullScreenControls" value="-1">
          ????<param name="EnableTracker" value="-1">
          ????<!--是否允許拉動播放進(jìn)度條到任意地方播放-->
          ????<param name="Filename" value="" valuetype="ref">
          ????<param name="InvokeURLs" value="-1">
          ????<param name="Language" value="-1">
          ????<param name="Mute" value="0">
          ????<!--是否靜音-->
          ????<param name="PlayCount" value="10">
          ????<!--重復(fù)播放次數(shù),0為始終重復(fù)-->
          ????<param name="PreviewMode" value="-1">
          ????<param name="Rate" value="1">
          ????<!--播放速度1.0-2.0倍的速度播放-->
          ????<param name="SAMILang" value>
          ????<param name="SAMIStyle" value>
          ????<param name="SAMIFileName" value>
          ????<!--選擇同時播放(伴音)的歌曲-->
          ????<param name="SelectionStart" value="-1">
          ????<param name="SelectionEnd" value="-1">
          ????<param name="SendOpenStateChangeEvents" value="-1">
          ????<param name="SendWarningEvents" value="-1">
          ????<param name="SendErrorEvents" value="-1">
          ????<param name="SendKeyboardEvents" value="0">
          ????<param name="SendMouseClickEvents" value="0">
          ????<param name="SendMouseMoveEvents" value="0">
          ????<param name="SendPlayStateChangeEvents" value="-1">
          ????<param name="ShowCaptioning" value="0">
          ????<!--是否顯示字幕,為一塊黑色,下面會有一大塊黑色,一般不顯示-->
          ????<param name="ShowControls" value="-1">
          ????<!--是否顯示控制,比如播放,停止,暫停-->
          ????<param name="ShowAudioControls" value="-1">
          ????<!--是否顯示音量控制-->
          ????<param name="ShowDisplay" value="0">
          ????<!--顯示節(jié)目信息,比如版權(quán)等-->
          ????<param name="ShowGotoBar" value="0">
          ????<!--一條框,在下面,有往下箭頭-->
          ????<param name="ShowPositionControls" value="-1">
          ????<!--是否顯示往前往后及列表,如果顯示一般也都是灰色不可控制-->
          ????<param name="ShowStatusBar" value="-1">
          ????<!--當(dāng)前播放信息,顯示是否正在播放,及總播放時間和當(dāng)前播放到的時間-->
          ????<param name="ShowTracker" value="-1">
          ????<!--是否顯示當(dāng)前播放跟蹤條,即當(dāng)前的播放進(jìn)度條-->
          ????<param name="TransparentAtStart" value="-1">
          ????<param name="VideoBorderWidth" value="0">
          ????<!--顯示部的寬部,如果小于視頻寬,則最小為視頻寬,或者加大到指定值,并自動加大高度.此改變只改變四周的黑框大小,不改變視頻大小-->
          ????<param name="VideoBorderColor" value="0">
          ????<!--顯示黑色框的顏色, 為RGB值,比如ffff00為黃色-->
          ????<param name="VideoBorder3D" value="0">
          ????<param name="Volume" value="0">
          ????<!--音量大小,負(fù)值表示是當(dāng)前音量的減值,值自動會取絕對值,最大為0,最小為-9640,最大0-->
          ????<param name="WindowlessVideo" value="0">
          ????<embed src="-1" width="286" height="225" autostart="0" audiostream="-1" autosize="-1" animationatstart="-1" allowscan="-1" allowchangedisplaysize="-1" autorewind="0" balance="0" baseurl="value" bufferingtime="15" captioningid="value" clicktoplay="-1" cursortype="0" currentposition="0" currentmarker="0" defaultframe="value" displaybackcolor="0" displayforecolor="16777215" displaymode="0" displaysize="0" enabled="-1" enablecontextmenu="-1" enablepositioncontrols="-1" enablefullscreencontrols="-1" enabletracker="-1" filename="" invokeurls="-1" language="-1" mute="0" playcount="10" previewmode="-1" rate="1" samilang="value" samistyle="value" samifilename="value" selectionstart="-1" selectionend="-1" sendopenstatechangeevents="-1" sendwarningevents="-1" senderrorevents="-1" sendkeyboardevents="0" sendmouseclickevents="0" sendmousemoveevents="0" sendplaystatechangeevents="-1" showcaptioning="0" showcontrols="-1" showaudiocontrols="-1" showdisplay="0" showgotobar="0" showpositioncontrols="-1" showstatusbar="-1" showtracker="-1" transparentatstart="-1" videoborderwidth="0" videobordercolor="0" videoborder3d="0" volume="0" windowlessvideo="0"></embed>
          ????<!--如果是0可以允許全屏,否則只能在窗口中查看-->
          ???</object>
          ??</td>
          ??<td>
          ???<div id=playListTitle>Play List:</div>
          ???<select id=playList size=2 ondragover="playList_dragOver();" ondragenter="playList_dragEnter();"
          ??? ondrop="playList_drop();" onkeydown="playList_keyDown();" ondblclick="playList_dblClick();">
          ???</select>
          ??</td>
          ?</tr>
          </table>
          <script language="JavaScript1.2">

          var dragswitch=0
          var nsx
          var nsy
          var nstemp

          function drag_dropns(name){
          temp=eval(name)
          temp.captureEvents(Event.MOUSEDOWN | Event.MOUSEUP)
          temp.onmousedown=gons
          temp.onmousemove=dragns
          temp.onmouseup=stopns
          }

          function gons(e){
          temp.captureEvents(Event.MOUSEMOVE)
          nsx=e.x
          nsy=e.y
          }
          function dragns(e){
          if (dragswitch==1){
          temp.moveBy(e.x-nsx,e.y-nsy)
          return false
          }
          }

          function stopns(){
          temp.releaseEvents(Event.MOUSEMOVE)
          }


          //drag drop function for IE 4+////
          /////////////////////////////////

          var dragapproved=false

          function drag_dropie(){
          if (dragapproved==true){
          document.all.showimage.style.pixelLeft=tempx+event.clientX-iex
          document.all.showimage.style.pixelTop=tempy+event.clientY-iey
          return false
          }
          }

          function initializedragie(){
          iex=event.clientX
          iey=event.clientY
          tempx=showimage.style.pixelLeft
          tempy=showimage.style.pixelTop
          dragapproved=true
          document.onmousemove=drag_dropie
          }


          if (document.all){
          document.onmouseup=new Function("dragapproved=false")
          }

          ////drag drop functions end here//////

          function hidebox(){
          if (document.all)
          showimage.style.visibility="hidden"
          else if (document.layers)
          document.showimage.visibility="hide"
          }


          </script>
          <div id="showimage" style="position:absolute; width:500px; left:465px; top:18px; height: 0px;">
          <table border="0" width="199" cellspacing="0" cellpadding="0">
          ? <tr>
          ??? <td width="100%"><table border="0" width="100%" cellspacing="0" cellpadding="0"
          ??? height="36">
          ????? <tr>
          ??????? <td width="100%" bgcolor="#C6FFC6" style="padding:4px" onMousedown="initializedragie()"><ilayer width="100%" onSelectStart="return false"><layer width="100%" onMouseover="dragswitch=1;drag_dropns(showimage)" onMouseout="dragswitch=0" class="style1">
          ??????? <div align="left" class="style2">
          ????????? <div align="center">用鼠標(biāo)按著我拖拖看<span class="style7">^o^</span></div>
          ??????? </div>
          ??????? </layer>
          ??????? </ilayer></td>
          ??????? <td bgcolor="#00CCFF" style="cursor:hand"><strong><a href="#" onClick="hidebox();return false">×</a></strong></td>
          ????? </tr>
          ????? <tr>
          ??????? <td width="100%" style="padding:4px" colspan="2"><p> </p>
          ????????? <div id=musicList ondragstart="musicList_dragStart();">
          ??????????? <div class="style2" id=musicListTitle>All Music</div>
          ??????????? <span class="style2"><a href="??????????? <a href="??????????? <a href="??????????? <a href="??????????? <hr>
          ??????????? <span class="style4">Tips: 把歌曲拖入播放列表<br>
          ??????????? </span>
          ????????????? <input type="button" class="style2" onclick="doFull();" value="全屏/ESC返回">
          ????????????? </div>
          ????????? </td>
          ????? </tr>
          ??? </table>
          ??? </td>
          ? </tr>
          </table>
          </div>
          <div id=info></div>
          <body>
          </html>



          <HTML xmlns:v>
          <style>
          v\:*{behavior:url(#default#VML)}
          v\:textpath{font-family:楷體_gb2312;font-size:26px;v-text-align:left}
          </style>
          <body>
          <xmp id=xLyric style=display:none>
          [ti:請跟我來]
          [ar:蘇芮&虞戡平]
          [al:]
          [00:00.00]曲 : 梁弘志
          [00:06.34]詞 : 梁弘志
          [00:16.00]<1-3:3;6:2;7:3>我踩著不變的步伐
          [00:22.19]<3:2;6:2;9:2>是為了配合你的到來
          [00:28.54]在慌張遲疑的時候
          [00:35.25]請跟我來
          [00:41.61]我?guī)е鴫艋玫钠诖?
          [00:47.96]是無法按捺的情懷
          [00:53.99]在你不注意的時候
          [01:00.75]請跟我來
          [02:19.49][01:10.00]別說什么
          [02:26.39][01:16.28]那是你無法預(yù)知的世界
          [02:33.94][01:23.51]別說 你不用說
          [02:39.72][01:29.32]你的眼睛已經(jīng)告訴了我
          [02:52.22][01:42.46]當(dāng)春雨飄呀飄的飄在
          [02:58.54][01:48.41]你滴也滴不完的發(fā)梢
          [03:04.62][01:54.53]戴著你的水晶珠鏈
          [03:11.60][02:01.36]請跟我來
          [03:19.24][02:07.02]www.aboutplayer.com
          </xmp>
          </body>
          </html>
          <script>
          window.onerror=function(){return false}
          start()
          function start(){
          ?browser_ini()
          ?timer_ini()
          ?emv_ini()
          ?lrc.setData(oo("xLyric").innerHTML)
          ?lrc.write("歌曲載入中,請耐心等待...","l")
          ?emv.play("mms://218.66.102.192/mp3/2005-01-06/fea30a20-e49f-4ebc-8f25-44cfe4830ca7.wma")
          }
          function emv_ini(){
          ?var l
          ?window.emv={}
          ?lrc_ini()
          ?l="<div id=bxEmv style=position:absolute;left:180;top:50;width:600;height:460>"
          ?l+="<div style=position:absolute;left:0;top:0;width:600;height:460;></div>"
          ?l+="<div id=bxEmvScreen style=position:absolute;overflow:hidden;left:19;top:26;width:560;height:360;>"
          ?l+="</div>"
          ?l+="</div>"
          ?l+="<object classid=clsid:22D6F312-B0F6-11D0-94AB-0080C74C7E95 id=mplayer width=250 height=200 style=display:none></object>"
          ?insHtm(document.body,l)
          ?emv.play=function(url){oo("mplayer").FileName=url;oo("mplayer").Play()}
          ?emv.time=function(){
          ??var mPos=mplayer.CurrentPosition,n=lrc.i
          ??var n1,o,len,w,per,n0,n1
          ??n1=n<lrc.arr.length-1?lrc.arr[n+1].slice(0,"|")*1:9999
          ??if(n1<mPos){
          ???lrc.i++
          ???n++
          ???if(n==0)
          ????lrc.write(lrc.arr[n].slice("|"),"l")
          ???if(n<lrc.arr.length-1)
          ????lrc.write(lrc.arr[n+1].slice("|"),n%2==1?"l":"r")
          ??}
          ??if(n>=0){
          ???n0=lrc.arr[n].slice(0,"|")
          ???n1=lrc.arr.length>n+1?lrc.arr[n+1].slice(0,"|"):4
          ???o=oo("bxCaption_"+(n%2==0?"l":"r")+"_cover")
          ???len=o.time!=""?o.time*1:n1-n0
          ???per=(mPos-n0)/len
          ???for(i=0.001;i<1;i+=0.001){
          ????per1=lrc.getRealPos(o,i)
          ????if(per1>=per)
          ?????break
          ???}
          ???o.style.width=o.width*i
          ??}
          ?}
          ?timer.add("emv.time()")
          }
          function lrc_ini(){
          ?window.lrc={}
          ?lrc.wordPer=function(str,pos){
          ??return str.slice(0,pos).replace(/[^\x00-\xff]/g,"? ").length/str.replace(/[^\x00-\xff]/g,"? ").length
          ?}
          ?lrc.setData=function(str){
          ??var l,a,i,ad,n,j
          ??str=str.replace(/\|/g,"").replace(/\r\n/g,"\n")
          ??str=str.replace(/\[(\d\d)\:(\d\d)\.(\d\d)\]/g,function($0,$1,$2,$3){return ($1*60+$2*1+$3/100)+"|"})
          ??a=str.split("\n")
          ??lrc.arr=new Array()
          ??for(i=0;i<a.length;i++){
          ???ad=a[i].split("|")
          ???for(j=1;j<ad.length;j++){
          ????lrc.arr.add(ad[j-1]+"|"+ad[ad.length-1])
          ???}
          ??}
          ??lrc.i=-1
          ??sortIndex=0
          ??sortDir=1
          ??lrc.arr.sort(sortFoo)
          ?}
          ?lrc.getRealPos=function(obj,pos){
          ??var a=obj.path,zoom=obj.zoom,pos1=pos*zoom
          ??var a,i,ad
          ??for(i=0;i<a.length;i++){
          ???ad=a[i]
          ???if(pos<=ad[0])
          ????continue
          ???if(pos>ad[0]&&pos<=ad[1])
          ????pos1+=(zoom*ad[2]-zoom)*(pos-ad[0])
          ???else{
          ????pos1+=(zoom*ad[2]-zoom)*(ad[1]-ad[0])
          ???}
          ????
          ??}
          ??return pos1
          ?}
          ?lrc.write=function(str,pos){
          ??var word=str,style=""
          ??var x,y,l,w,w1,o,a,i,ad
          ??if(/^\<.+\>/.test(str)){
          ???word=str.slice(">")
          ???style=str.slice(1).slice(0,">")
          ??}
          ??w=word.replace(/[^\x00-\xff]/g,"? ").length*13+2
          ??if(pos=="l"){
          ???x=40
          ???y=285
          ??}
          ??else{
          ???x=520-w
          ???y=315
          ??}
          ??l="<div id=bxCaption_"+pos+" style='position:absolute;left:"+x+";top:"+y+";width:"+w+";height:32;overflow:hidden'>"
          ??l+="<v:curve to=800,1 strokecolor=black strokeweight=3 style=position:absolute;top:14>"
          ??l+="<v:path textpathok=t /><v:textpath on=t string='"+word+"' /></v:curve>"
          ??l+="<v:curve to=800,1 strokecolor=white fillcolor=white strokeweight=1 style=position:absolute;top:14>"
          ??l+="<v:path textpathok=t /><v:textpath on=t string='"+word+"' /></v:curve>"
          ??l+="</div>"
          ??l+="<div id=bxCaption_"+pos+"_cover width="+w+" style=position:absolute;left:"+x+";top:"+y+";width:0;height:32;overflow:hidden>"
          ??l+="<v:curve to=800,1 strokecolor=white strokeweight=3 style=position:absolute;top:14>"
          ??l+="<v:path textpathok=t /><v:textpath on=t string='"+word+"' /></v:curve>"
          ??l+="<v:curve to=800,1 strokecolor=blue fillcolor=blue strokeweight=1 style=position:absolute;top:14>"
          ??l+="<v:path textpathok=t /><v:textpath on=t string='"+word+"' /></v:curve>"
          ??l+="</div>"
          ??odel("bxCaption_"+pos)
          ??odel("bxCaption_"+pos+"_cover")
          ??insHtm("bxEmvScreen",l)
          ??o=oo("bxCaption_"+pos+"_cover")
          ??o.time=style.get("time")
          ??o.path=new Array()
          ??len1=1
          ??a=style.split(";")
          ??for(i=0;i<a.length;i++){
          ???if(!/(\d+):(\d+)/.test(a[i]))
          ????continue
          ???if(/(\d+)-(\d+):(\d+)/.test(a[i])){
          ????ad=/(\d+)-(\d+):(\d+)/.exec(a[i])
          ????ad[0]=lrc.wordPer(word,ad[1]-1)
          ????ad[1]=lrc.wordPer(word,ad[2]*1)
          ????ad[2]=ad[3]
          ???}
          ???else{
          ????ad=/(\d+):(.+)/.exec(a[i])
          ????ad[0]=lrc.wordPer(word,ad[1]-1)
          ????ad[1]=lrc.wordPer(word,ad[1]*1)
          ???}
          ???len1+=(ad[1]-ad[0])*(ad[2]-1)
          ???o.path.add(ad)
          ??}
          ??o.zoom=1/len1
          ?}?
          }
          function browser_ini(){
          ?window.isIE=navigator.userAgent.indexOf("IE")>0
          ?window.isIE5=navigator.userAgent.indexOf("IE 5.0")>0
          ?String.prototype.trim=function(){return this.replace(/(^[\s]*)|([\s]*$)/g,"")}
          ?String.prototype.inc=function(s1,s2){if(s2==null){s2=","};return (s2+this+s2).indexOf(s2+s1+s2)>-1?true:false}
          ?String.prototype._slice="".slice
          ?String.prototype.slice=function(n1,n2){var v,b1=typeof(n1)=="number",b2=typeof(n2)=="number";if(!b1||typeof(n2)=="string"){v=eval("this._slice("+(b1?n1:this.indexOf(n1)+(n2==null?1:0)+(this.indexOf(n1)==-1?this.length:0))+(n2==null?"":(b2?n2:(this.indexOf(n2)==-1?"":","+this.indexOf(n2))))+")")}else{v=isIE5&&n1<0&&n2==null?this._slice(this.length-1):eval("this._slice(n1"+(n2==null?"":","+n2)+")")}return v}
          ?String.prototype.get=function(str,def){if(this.inc(str,";"))return 1;var a=this.match(new RegExp("(^|;)"+str+":[^;]*"));return a==null||str==""?(def==null?"":def):a[0].replace(";","").slice(str.length+1)}
          ?Array.prototype.add=function(key){this[this.length]=key}
          ?window.oo=function(obj){return typeof(obj)=="string"?document.getElementById(obj):obj}
          ?window.insHtm=function(op,html,inEnd){op=oo(op);if(isIE){op.insertAdjacentHTML(inEnd==null?"beforeend":"afterbegin",html)}else{var r=op.ownerDocument.createRange();r.setStartBefore(op);eval("op."+(inEnd==null?"appendChild":"insertBefore")+"(r.createContextualFragment(html),op.firstChild)");}}
          ?window.odel=function(obj){if(oo(obj)!=null){oo(obj).parentNode.removeChild(oo(obj))}}
          ?if(!isIE){
          ???? HTMLElement.prototype.contains=function(node){if(!node)return false;do if(node==this){return true}while(node=node.parentNode){return false}}
          ??Event.prototype.__defineGetter__("srcElement",function(){var node=this.target;while(node.nodeType!=1){node=node.parentNode}return node})
          ??Event.prototype.__defineGetter__("toElement",function(){return this.relatedTarget})
          ?}
          }
          function timer_ini(){
          ?window.timer={}
          ?timer.handle=null
          ?timer.queue=""
          ?timer.i=0
          ?timer.add=function(key){if(!timer.queue.inc(key,";")){timer.queue+=key+";"}}
          ?timer.del=function(key){timer.queue=move.queue.replace(key+";","")}
          ?timer.inv=function(){
          ??window.clearTimeout(timer.handle)
          ??eval(timer.queue)
          ??timer.i++
          ??timer.handle=window.setTimeout("timer.inv()",10)
          ?}
          ?timer.inv()
          }
          function sortFoo(v1,v2){
          ??? var s1=v1.split("|")[sortIndex],s2=v2.split("|")[sortIndex]
          ??? if(!isNaN(s1)&&!isNaN(s2)){
          ??s1*=1
          ??s2*=1
          ??? }
          ?return (s1==s2?0:(s1>s2?1:-1))*sortDir
          }
          </script>



          posted on 2006-12-19 16:21 mlw2000 閱讀(500) 評論(0)  編輯  收藏 所屬分類: JavaScript

          主站蜘蛛池模板: 霞浦县| 涪陵区| 上栗县| 湖北省| 英超| 额尔古纳市| 十堰市| 隆回县| 临泽县| 北海市| 孟州市| 梧州市| 三门县| 通辽市| 玉树县| 修武县| 武强县| 渑池县| 囊谦县| 大洼县| 泸水县| 巴彦淖尔市| 米林县| 广宗县| 昌邑市| 桃源县| 贡觉县| 堆龙德庆县| 盱眙县| 通州市| 南靖县| 隆回县| 平原县| 邻水| 临桂县| 师宗县| 十堰市| 合肥市| 延边| 喜德县| 高淳县|