www.gusucode.com > 流光音乐建站系统 1.1码程序 > Js/common.js
//+++++++++++++++++++++++++++++++++++++++版权信息+++++++++++++++++++++++++++++++++++++++++++++ // 流光音乐系统 1.0 //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ function getObject(idname) {if (document.getElementById){return document.getElementById(idname);}else if (document.all){return document.all[idname];}else if (document.layers){return document.layers[idname];}else{return null;}}function getTags(parentobj, tag){if (parentobj == null){return new Array();}else if (typeof parentobj.getElementsByTagName != 'undefined'){return parentobj.getElementsByTagName(tag);}else if (parentobj.all && parentobj.all.tags){return parentobj.all.tags(tag);}else{return new Array();}}function clk(act,id){var v = "";var o;var a = getTags(getObject(id),"input");for(var i=0; i<a.length; i++){o = a[i];if(act=="all"){o.checked = true;}else if(act=="un"){if(o.checked){o.checked = false;}else{o.checked = true;}}else{var n = a[i].value;if(n>0 && a[i].checked){v = v + a[i].value + "&id=";}}}if(act=="play"){v = v.substring(0,v.length);if(v.length==0){alert("请选择歌曲后再进行连播!");}else{window.open("/player/?id="+v+"","players");}}} // 非根目录用户请修改/player/这里 function copyInBoard(s) { window.clipboardData.setData("text",s); alert("网址复制成功啦!"); } function openPop(obj) { URL=obj.href; window.open(URL,'',"width=580, height=380,top=200,left=80,toolbar=yes,location=yes,directories=yes,status=yes,menubar=yes,scrollbars=yes,resizable=1,copyhistory=yes"); return false; } function setCookie(name, value, hours) { var expire = ""; if(hours != null){ expire = new Date((new Date()).getTime() + hours * 3600000); expire = "; expires=" + expire.toGMTString(); } document.cookie = name + "=" + escape(value)+ ";path=/" + expire; } function getCookie(name){ var cookieValue = ""; var search = name + "="; if(document.cookie.length > 0) { offset = document.cookie.indexOf(search); if (offset != -1){ offset += search.length; end = document.cookie.indexOf(";", offset); if (end == -1) end = document.cookie.length; cookieValue = unescape(document.cookie.substring(offset, end)); } } return cookieValue; } function memo(){if(getObject('ismemo').style.height!='auto'){getObject('ismemo').style.height='auto';getObject('memotxt').innerHTML="收缩歌手介绍";}else{getObject('ismemo').style.height='63px';getObject('memotxt').innerHTML="点击展开更多介绍";}} function box(obj) { URL=obj.href; window.open(URL,'',"width=316, height=450,top=200,left=80,toolbar=yes,location=yes,directories=yes,status=yes,menubar=yes,scrollbars=yes,resizable=1,copyhistory=yes"); return false; }