⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 function.js

📁 asp制作的音乐系统,初步功能实现了用户登录
💻 JS
字号:
var menuskin = "skin1";
var songid;
function showmenuie5() {
var rightedge = document.body.clientWidth-event.clientX;
var bottomedge = document.body.clientHeight-event.clientY;
if (rightedge <ie5menu.offsetWidth)
ie5menu.style.left = document.body.scrollLeft + event.clientX - ie5menu.offsetWidth;
else
ie5menu.style.left = document.body.scrollLeft + event.clientX;
if (bottomedge <ie5menu.offsetHeight)
ie5menu.style.top = document.body.scrollTop + event.clientY - ie5menu.offsetHeight;
else
ie5menu.style.top = document.body.scrollTop + event.clientY;
if(event.srcElement.getAttribute("songid") != null){
songid=event.srcElement.songid;
ie5menu.style.visibility = "visible";
return false;
}
}
function hidemenuie5() {
ie5menu.style.visibility = "hidden";
}
function highlightie5() {
if (event.srcElement.className == "menuitems") {
event.srcElement.style.backgroundColor = "highlight";
event.srcElement.style.color = "white";
}
}
function lowlightie5() {
if (event.srcElement.className == "menuitems") {
event.srcElement.style.backgroundColor = "";
event.srcElement.style.color = "black";
}
}
function jumptoie5() {
if (event.srcElement.className == "menuitems") {
if (event.srcElement.getAttribute("target") != null){
window.open(event.srcElement.url, event.srcElement.getAttribute("target"));
}
else
window.location = event.srcElement.url;
}
}

function SetCookie (name, value)
{
 document.cookie = name+"="+value;
}

function GetCookie (name) { 
var CookieFound = false; 
var start = 0; 
var end = 0; 
var CookieString = document.cookie; 
var i = 0; 

while (i <= CookieString.length) { 
start = i ; 
end = start + name.length; 
if (CookieString.substring(start, end) == name){ 
CookieFound = true; 
break; 
} 
i++; 
} 

if (CookieFound){ 
start = end + 1; 
end = CookieString.indexOf(";",start); 
if (end < start) 
end = CookieString.length; 
return unescape(CookieString.substring(start, end)); 
} 
return ""; 
} 

function Play(){
var argv = Play.arguments; 
var argc = Play.arguments.length; 
if(argc>0) songid=argv[0]; 
SetCookie("playlist",songid);
SetCookie("index",0);
url="play.asp?id="+songid+"&index=0";
window.open(url,"play","height=340,width=320");
}
function Addtolist(){
playlist=GetCookie("playlist")+","+songid;
index=GetCookie("index");
SetCookie("playlist",playlist);
playlist="play.asp?id="+playlist+"&index="+index;
window.open(playlist,"play","height=340,width=320");
}
function Playall(){
var min=0;
var nodeList = document.getElementsByTagName("A");
for (var i = 0; i < nodeList.length; i++)
{
if(nodeList[i].getAttribute("songid") != null){
if(min==0) {playlist=nodeList[i].getAttribute("songid");min=1;}
else playlist=playlist+","+nodeList[i].getAttribute("songid");
}
}
SetCookie("playlist",playlist);
playlist="play.asp?id="+playlist+"&index=0";
window.open(playlist,"play","height=340,width=320");
}
function Download(){
url="download.asp?id="+songid;
window.open(url,"download","width=468,height=142");
}
function AddtoCommon(){
url="save_to_common.asp?action=save&id="+songid;
window.location = url;
}
function AddtoFavorite(){
url="save_to_favorite.asp?id="+songid;
window.location = url;
}
function Lyric(){
url="getlyric.asp?id="+songid;
window.open(url,"lyric","scrollbars=yes,left=200,top=150,width=360,height=400");
}
function Send(){
url="send.asp?id="+songid;
window.open(url,"send","left=200,top=100,width=500,height=300");
}
function Updata(){
url="updata.asp?id="+songid;
window.open(url,"updata","width=468,height=142");
}
function AddMusic(){
url="addmusic.asp?id="+songid;
window.open(url,"addmusic","width=468,height=150");
}
function Delete(){
url="delete.asp?id="+songid;
window.location = url;
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -