Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/jquery/77.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
cpu利用率达到100%,并且jquery speek()函数在linux中不工作_Jquery_Ajax_Linux - Fatal编程技术网

cpu利用率达到100%,并且jquery speek()函数在linux中不工作

cpu利用率达到100%,并且jquery speek()函数在linux中不工作,jquery,ajax,linux,Jquery,Ajax,Linux,当我在应用程序中打开特定表时,cpu使用率达到100% 我的jquery已加载,但speek()仍不工作。试图修复它浪费了很多时间 也尝试过使用setTimeout(),但仍然没有成功 function get_all_op_tkt() { var timen = ' <?php echo date("d/m/Y l h:i:s A"); ?>'; // alert(timen); $('.page-header marquee').text('OP

当我在应用程序中打开特定表时,cpu使用率达到100%

我的jquery已加载,但speek()仍不工作。试图修复它浪费了很多时间

也尝试过使用setTimeout(),但仍然没有成功

function get_all_op_tkt()
{
     var timen = ' <?php echo date("d/m/Y  l h:i:s A");  ?>';
     // alert(timen);
    $('.page-header marquee').text('OP QUEUE :'+timen);
    $.ajax({
            url: "<?php echo base_url(); ?>opqueue/get_op_all_lst",
            data:1,
            type:"POST",
            dataType:"json",
            // data: 'user_id='+id+'&<?php echo $this->security->get_csrf_token_name(); ?>=<?php echo $this->security->get_csrf_hash(); ?>',
            success: function(data){


                    $.each(data.spereakk, function (a, b) 
                    {
                        function speak(text) 
                        {
                        var msg = new SpeechSynthesisUtterance();
                        var voices = speechSynthesis.getVoices();
                        msg.voice = voices[20];
                        msg.voiceURI = 'native';
                        msg.volume = 50;
                        msg.rate = 1/1.4;
                        msg.pitch = 25;
                        msg.text = text;
                        msg.lang = 'en-IN';
                        speechSynthesis.speak(msg);
                        }                                       
                        $('.spereakk').append('<tr class = "countin" text-align ="left"><td class = "countrno"><strong>'+b.token_no+'</strong></td><td class="countrnoo"><strong>'+b.consult_rm+'</strong></td></tr>');

                        speak('token number'+b.token_no+" "+'Room Number' +" "+b.consult_rm);
                        });
            },
            error:function(){
                alert("Network Error");
            }
        }); 

  clearInterval(get_all_op_tkt);
}



setInterval(function(){
get_all_op_tkt();
函数get_all_op_tkt()
{
var-timen='';
//警报(timen);
$('.page-header-marquee').text('OP-QUEUE:'+timen);
$.ajax({
url:“opqueue/get_op_all_lst”,
数据:1,
类型:“POST”,
数据类型:“json”,
//数据:“用户id=”+id+”&=”,
成功:功能(数据){
$.each(data.spereakk,函数(a,b)
{
功能发言(文本)
{
var msg=newspeechsynthesisutterance();
var voices=speechSynthesis.getVoices();
msg.voice=语音[20];
msg.voiceURI='native';
msg.volume=50;
msg.rate=1/1.4;
msg.pitch=25;
msg.text=文本;
msg.lang='en-IN';
语音合成(msg);
}                                       
$('.spereakk')。追加(''+b.token\u no+''+b.consult\u rm+'');
说话(‘代币号码’+b.token\u no++++“房间号码”+++b.consult\u rm);
});
},
错误:函数(){
警报(“网络错误”);
}
}); 
clearInterval(获取所有操作);
}
setInterval(函数(){
获取所有的操作;
},1000)