codecamp

_sound.play播放声音

  • 函数原型

/* 创建应用快捷方式

* @string url   声音文件的地址,内置了一些声音

*/

_sound.play=function(url){

if(!window.frames['soundframe']){

_sound.create();

}

switch(url){

case 'msg':

url=SITEURL+'dzz/sound/mp3/msg.mp3?t=1';

break;

case 'system':

url=SITEURL+'dzz/sound/mp3/system.mp3?t=1';

break;

case 'shake':

url=SITEURL+'dzz/sound/mp3/shake.mp3?t=1';

break;

case 'global':

url=SITEURL+'dzz/sound/mp3/global.mp3?t=1';

break;

case 'tweet':

url=SITEURL+'dzz/sound/mp3/tweet.mp3?t=1';

break;

case 'notice':

url=SITEURL+'dzz/sound/mp3/tweet.mp3?t=1';

break;

default:

url=SITEURL+url;

}

url=encodeURIComponent(url);

window.frames['soundframe'].location=_sound.playurl+url;

};

_layout.setTaskbarPosition设置任务栏位置
ajaxget() AJAX/GET请求(获取数据)
温馨提示
下载编程狮App,免费阅读超1000+编程语言教程
取消
确定
目录

Dzz系统框架

输入数据处理

数据DB层

安全相关

上传组件

评论组件

关闭

MIP.setData({ 'pageTheme' : getCookie('pageTheme') || {'day':true, 'night':false}, 'pageFontSize' : getCookie('pageFontSize') || 20 }); MIP.watch('pageTheme', function(newValue){ setCookie('pageTheme', JSON.stringify(newValue)) }); MIP.watch('pageFontSize', function(newValue){ setCookie('pageFontSize', newValue) }); function setCookie(name, value){ var days = 1; var exp = new Date(); exp.setTime(exp.getTime() + days*24*60*60*1000); document.cookie = name + '=' + value + ';expires=' + exp.toUTCString(); } function getCookie(name){ var reg = new RegExp('(^| )' + name + '=([^;]*)(;|$)'); return document.cookie.match(reg) ? JSON.parse(document.cookie.match(reg)[2]) : null; }