富贵资源网 Design By www.hznty.com
用js播放.wav文件
复制代码 代码如下:
<html>
<head>
<script language="javascript">
function playSound(id)
{
var node=document.getElementById(id);
if(node!=null)
{
node.Play();
}
}
</script>
</head>
<body>
<embed name="3_devUnknown" id="3_devUnknown" src="/UploadFiles/2021-04-02/music.wav"></body>
</hmtl>
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 "<embed id='"+ rec.id +"_devUnknown' name='"+ rec.id +"_devUnknown' src='music.wav' loop=false autostart=false hidden=true><a href='#' onclick=\"javascript:playSound('"+rec.id+"_devUnknown')\">"+value+"</a></embed>";
}}
],
proxy: new Ext.data.HttpProxy({
url: 'ctl.php?c=HisRecordQueryController&a=Query'
}),
sortInfo: {field: 'begin_date', direction: 'ASC'},
listeners:{
beforeload:function(obj,params){
var begin_date = document.getElementById("his_startdt").value;
var end_date = document.getElementById("his_enddt").value;
var src = document.getElementById("his_src").value;
var dst = document.getElementById("his_dst").value;
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文件
<script language="javascript">
var arr = new Array();
var c = 0;
window.onload = function () {
var value1 = '<%=tel_2 %>';
var value2 = '<%=je %>'
StrToArray(value1);
StrToArray(value2);
}
var StrToArray = function (str) {
for (var i = 0; i < str.length; i++) {
arr[arr.length] = str.charAt(i);
}
}
var id = window.setInterval(function () {
if (c > arr.length) {
window.clearInterval(id); //清除
return;
}
embed(arr[c++]);
}, 1000);
var embed = function (num) {
if (num == "" || typeof num == "undefined") return;
document.getElementById("embed").innerHTML = "<embed name=\"player\" TYPE=\"application/x-mplayer2\" src=\"../wav/" + num + ".wav\" loop=\"false\" autostart=\"true\" hidden=\"true\"></embed>";
}
</script>
复制代码 代码如下:
<html>
<head>
<script language="javascript">
function playSound(id)
{
var node=document.getElementById(id);
if(node!=null)
{
node.Play();
}
}
</script>
</head>
<body>
<embed name="3_devUnknown" id="3_devUnknown" src="/UploadFiles/2021-04-02/music.wav"></body>
</hmtl>
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 "<embed id='"+ rec.id +"_devUnknown' name='"+ rec.id +"_devUnknown' src='music.wav' loop=false autostart=false hidden=true><a href='#' onclick=\"javascript:playSound('"+rec.id+"_devUnknown')\">"+value+"</a></embed>";
}}
],
proxy: new Ext.data.HttpProxy({
url: 'ctl.php?c=HisRecordQueryController&a=Query'
}),
sortInfo: {field: 'begin_date', direction: 'ASC'},
listeners:{
beforeload:function(obj,params){
var begin_date = document.getElementById("his_startdt").value;
var end_date = document.getElementById("his_enddt").value;
var src = document.getElementById("his_src").value;
var dst = document.getElementById("his_dst").value;
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文件
<script language="javascript">
var arr = new Array();
var c = 0;
window.onload = function () {
var value1 = '<%=tel_2 %>';
var value2 = '<%=je %>'
StrToArray(value1);
StrToArray(value2);
}
var StrToArray = function (str) {
for (var i = 0; i < str.length; i++) {
arr[arr.length] = str.charAt(i);
}
}
var id = window.setInterval(function () {
if (c > arr.length) {
window.clearInterval(id); //清除
return;
}
embed(arr[c++]);
}, 1000);
var embed = function (num) {
if (num == "" || typeof num == "undefined") return;
document.getElementById("embed").innerHTML = "<embed name=\"player\" TYPE=\"application/x-mplayer2\" src=\"../wav/" + num + ".wav\" loop=\"false\" autostart=\"true\" hidden=\"true\"></embed>";
}
</script>
富贵资源网 Design By www.hznty.com
广告合作:本站广告合作请联系QQ:858582 申请时备注:广告合作(否则不回)
免责声明:本站资源来自互联网收集,仅供用于学习和交流,请遵循相关法律法规,本站一切资源不代表本站立场,如有侵权、后门、不妥请联系本站删除!
免责声明:本站资源来自互联网收集,仅供用于学习和交流,请遵循相关法律法规,本站一切资源不代表本站立场,如有侵权、后门、不妥请联系本站删除!
富贵资源网 Design By www.hznty.com
暂无评论...
RTX 5090要首发 性能要翻倍!三星展示GDDR7显存
三星在GTC上展示了专为下一代游戏GPU设计的GDDR7内存。
首次推出的GDDR7内存模块密度为16GB,每个模块容量为2GB。其速度预设为32 Gbps(PAM3),但也可以降至28 Gbps,以提高产量和初始阶段的整体性能和成本效益。
据三星表示,GDDR7内存的能效将提高20%,同时工作电压仅为1.1V,低于标准的1.2V。通过采用更新的封装材料和优化的电路设计,使得在高速运行时的发热量降低,GDDR7的热阻比GDDR6降低了70%。