0

java脚本中网络语音中的speak函数在foreach循环中不起作用?

if(com1[0]=="timeline")
{

$(function(){

$.ajax({
    url: 'get_tweets.php',
    type: 'GET',
    success: function(response) {

        if (typeof response.errors === 'undefined' || response.errors.length < 1) {

            var $tweets = $('<p></p>');
            $.each(response, function(i, obj) {

             var result="say next tweet ";
                             var msg = new SpeechSynthesisUtterance(result);
                             synth.speak(msg);  

              alert(i);
                $tweets.append('tweet' +'<br>' + obj.text + '<br>');
                $('.tweets-container').html($tweets);

            });
        } 
4

0 回答 0