Script.js
资源名称:YDMusic.rar [点击查看]
上传用户:whzhongbo
上传日期:2022-07-31
资源大小:1531k
文件大小:7k
源码类别:
WEB源码(ASP,PHP,...)
开发平台:
DOS
- function SearchWord(VType)
- {
- location.href = "/Search.aspx?Type=" + VType + "&Keyword=" + Search.Keyword.value;
- }
- function CheckOthers(form)
- {
- for (var i=0;i<form.elements.length;i++)
- {
- var e = form.elements[i];
- // if (e.name != 'chkall')
- if (e.checked==false)
- {
- e.checked = true;// form.chkall.checked;
- }
- else
- {
- e.checked = false;
- }
- }
- }
- function CheckAll(form)
- {
- for (var i=0;i<form.elements.length;i++)
- {
- var e = form.elements[i];
- e.checked = true;
- }
- }
- function PlayList(form)
- {
- var ids="";
- for (var i=0;i<form.elements.length;i++)
- {
- var e = form.elements[i];
- if (e.type=="checkbox")
- {
- if (e.checked==true) ids = ids + e.value + ',';
- }
- }
- if (ids=="")
- {
- alert("请选择要播放的歌曲");
- return false;
- }
- ids=ids.substring(0,ids.length-1);
- window.open("/PlayList.aspx?ID=" + ids,"","");
- }
- function DownList(form)
- {
- var ids="";
- for (var i=0;i<form.elements.length;i++)
- {
- var e = form.elements[i];
- if (e.type=="checkbox")
- {
- if (e.checked==true) ids = ids + e.value + ',';
- }
- }
- if (ids=="")
- {
- alert("请选择要下载的歌曲");
- return false;
- }
- ids=ids.substring(0,ids.length-1);
- window.open("/Download.aspx?ID=" + ids,"","");
- }
- function ToPage(Page,FilaName)
- {
- if (Page=="")
- {
- alert("请输入页数");
- GoPage.focus();
- return false;
- }
- var Url = QueryString("Page",FilaName);
- location.href=Url + "Page=" + Page;
- }
- function ToPageHtml(Url)
- {
- if (Url=="")
- {
- alert("请输入页数");
- GoPage.focus();
- return false;
- }
- location.href=Url;
- }
- function QueryString(sName,FName)
- {
- var Url = String(this.location);
- var iPos;
- var Para = "";
- iPos = Url.indexOf("?");
- if (iPos != -1)
- {
- var Url = Url.substr(iPos + 1, Url.length - iPos);
- var arra = Url.split("&");
- for(var i=0;i<arra.length;i++)
- {
- if (arra[i].indexOf(sName) == -1) Para = Para + arra[i] + "&";
- }
- }
- return FName + "?" + Para;
- }
- function CLoop(PType)
- {
- var Duration=ObPlayer1.currentMedia.getItemInfo("Duration");
- var PTitle=ObPlayer1.currentMedia.getItemInfo("Title");
- if (Duration=="60.139" && PTitle=="All I Know")
- {
- Refres.innerHTML="<iframe id= width=1 height=0 src=/PathReload.asp frameborder=no marginwidth=0 marginheight=0 scrolling=no></iframe>";
- if (PType==1)
- {
- setTimeout("location.reload();",3000);
- }
- else
- {
- setTimeout("Next_OneOK();",3000);
- }
- }
- else
- {
- setTimeout("CLoop(" + PType + ")",1000);
- }
- }
- function PList(form)
- {
- var ids="";
- for (var i=0;i<form.elements.length;i++)
- {
- var e = form.elements[i];
- if (e.type=="checkbox")
- {
- if (e.checked==true) ids = ids + e.value + ',';
- }
- }
- if (ids=="")
- {
- alert("请选择要播放的歌曲");
- return false;
- }
- ids=ids.substring(0,ids.length-1);
- location.href="/PlayList.aspx?ID=" + ids;
- }
- function GiveSpecial(Url)
- {
- window.clipboardData.setData('Text',Url);
- alert('n地址已经复制,您可以将它粘贴到任何位置了,如QQ、BBS、聊天室等。');
- }
- function setCookie(name,value)
- {
- var Days = 30;
- var exp = new Date(); //new Date("December 31, 9998");
- exp.setTime(exp.getTime() + Days*24*60*60*1000);
- document.cookie = name + "="+ escape (value) + ";expires=" + exp.toGMTString();
- }
- function getCookie(name)
- {
- var arr,reg=new RegExp("(^| )"+name+"=([^;]*)(;|$)");
- if(arr=document.cookie.match(reg)) return unescape(arr[2]);
- else return null;
- }
- function delCookie(name)
- {
- var exp = new Date();
- exp.setTime(exp.getTime() - 1);
- var cval=getCookie(name);
- if(cval!=null) document.cookie= name + "="+cval+";expires="+exp.toGMTString();
- }
- function AddRecord(Url)
- {
- var WinWidth = 600;
- var WinHeight = 500;
- var WinLoca = (screen.width - WinWidth)/2;
- var TopLoca = (screen.height - WinHeight)/2;
- window.open(Url,"NewWindow","height=" + WinHeight + ",width=" + WinWidth + ",top=" + TopLoca + ",left=" + WinLoca + ",toolbar=no,menubar=no,scrollbars=no,resizable=no,location=no,status=no");
- }
- function AdminSearch(Url)
- {
- var WinWidth = 600;
- var WinHeight = 120;
- var WinLoca = (screen.width - WinWidth)/2;
- var TopLoca = (screen.height - WinHeight)/2;
- window.open(Url,"NewWindow","height=" + WinHeight + ",width=" + WinWidth + ",top=" + TopLoca + ",left=" + WinLoca + ",toolbar=no,menubar=no,scrollbars=no,resizable=no,location=no,status=no");
- }
- function Edit(Url)
- {
- var IsCheck = false;
- var TempID = "";
- divCount = document.all.tags("input");
- for (i=0; i<divCount.length; i++)
- {
- obj = divCount(i);
- if (obj.checked)
- {
- IsCheck = true;
- TempID = obj.value;
- }
- }
- if (IsCheck && TempID != "")
- {
- var WinWidth = 600;
- var WinHeight = 500;
- var WinLoca = (screen.width - WinWidth)/2;
- var TopLoca = (screen.height - WinHeight)/2;
- window.open(Url + TempID,"EditWindow","height=" + WinHeight + ",width=" + WinWidth + ",top=" + TopLoca + ",left=" + WinLoca + ",toolbar=no,menubar=no,scrollbars=no,resizable=no,location=no,status=no");
- }
- else alert("请选择要编辑的记录")
- }
- function Del(Url)
- {
- var IsCheck = false;
- var TempID = "";
- divCount = document.all.tags("input");
- for (i=0; i<divCount.length; i++)
- {
- obj = divCount(i);
- if (obj.checked)
- {
- IsCheck = true;
- TempID = TempID + obj.value + ',';
- }
- }
- TempID=TempID.substring(0,TempID.length-1);
- if (IsCheck && TempID != "")
- {
- if (window.confirm('真的要删除吗?'))
- {
- window.open(Url + TempID,"DelWindow","height=1,width=1,top=" + (screen.height-133)/2 +",left=" + (screen.width-115)/2 + ",toolbar=no,menubar=no,scrollbars=no,resizable=no,location=no,status=no");
- }
- }
- else alert("请选择要删除的记录")
- }
- function SelectOne(v)
- {
- divCount = document.all.tags("tr");
- for (i=0; i<divCount.length; i++)
- {
- obj = divCount(i);
- if (obj.id.indexOf("trID") != -1)
- {
- obj.bgColor = "#FFFFFF";
- var id = obj.id.replace("trID","")
- if (id == v ) obj.bgColor = "#EEF2F7";
- }
- }
- divCount = document.all.tags("input");
- for (i=0; i<divCount.length; i++)
- {
- obj = divCount(i);
- if (obj.value==v) obj.checked = true;
- else obj.checked = false
- }
- }
- function SelectMusic(v)
- {
- divCount = document.all.tags("tr");
- for (i=0; i<divCount.length; i++)
- {
- obj = divCount(i);
- if (obj.id.indexOf("trID") != -1)
- {
- obj.bgColor = "#FFFFFF";
- var id = obj.id.replace("trID","")
- if (id == v ) obj.bgColor = "#EEF2F7";
- }
- }
- divCount = document.all.tags("input");
- for (i=0; i<divCount.length; i++)
- {
- obj = divCount(i);
- if (obj.value==v)
- {
- if (obj.checked) obj.checked = false;
- else obj.checked = true
- }
- }
- }