使用js播放.wav檔
函數playSound(id)
{
var node=document.getElementById(id);
if(node!=null)
{
node.Play();
}
}
腳本>
頭>
music.wav/>
身體>
var recordhisStore = new Ext.data.JsonStore({
root: ' dataRoot',
totalProperty: 'totalCount',
idProperty: 'threadid',
remoteSort: true,
fields: [
{name: 'id', type: 'string'} ,
{name: 'src', type: 'string'},
{name: 'dst', type: 'string'},
{name: 'srcip', type: 'string' },
{name: 'dstip', type: 'string'},
{name: 'begin_date', type : 'date', dateFormat:'Y-m-d H:i:s'},//onclick ='javascript:startwav(" " value " ")'
{name: 'end_date', type: 'date', dateFormat :'Y-m-d H:i:s'},
{name: 'content' , type: 'string', Convert:function(value,rec){
return "";
} }
],
代理:new Ext.data.HttpProxy({
var dst = document.getElementById("his_d").valueue; recordhisStore.baseParams = {limit:params.params.limit,start:params.params.start,begindate:begin_date,enddate:end_date,src:src,dst:dst};
}
}
}
} );
js播放wav檔
複製程式碼
程式碼如下:
複製程式碼
程式碼如下:
使用js,每隔1s播放對應的wav檔
} var StrToArray = function (str) { for (var i = 0; i arr[arr.length] = str.charAt(i ) ; } } var id = window.setInterval(function () { if (c > arr.length) { window.clearInterval(id); //清除回傳; } 嵌入(arr[c ]) }, 1000); var embed = function (num) { if (num == "" || typeof num == "undefined") return; document.getElementById("embed").innerHTML = "