Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/php/254.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
Php 在数据库上完成修改后获取值_Php_Jquery_Ajax_Client Server - Fatal编程技术网

Php 在数据库上完成修改后获取值

Php 在数据库上完成修改后获取值,php,jquery,ajax,client-server,Php,Jquery,Ajax,Client Server,在我的程序中,我有一个选框标签。字幕的速度存储在数据库表中。这里我使用ajax定期获取速度参数(scrollamount)的值。我的代码的缺点是它不断地检查服务器是否进行了修改。而且字幕速度也下降了几毫秒。最好的方法是什么?插座能解决这个问题吗 function assignsped () { var uid=$("#txtuid").val(); var getvalue = $.ajax({ type: "POST", url: "ajax/g

在我的程序中,我有一个选框标签。字幕的速度存储在数据库表中。这里我使用ajax定期获取速度参数(scrollamount)的值。我的代码的缺点是它不断地检查服务器是否进行了修改。而且字幕速度也下降了几毫秒。最好的方法是什么?插座能解决这个问题吗

function assignsped () {
    var uid=$("#txtuid").val();
    var getvalue = $.ajax({
        type: "POST",
        url: "ajax/get_user_info.php",
        data: {uid:uid},
        async: false
    }).success(function(){
        setTimeout(function(){assignsped();}, 5000);
    }).responseText;

    document.getElementById('mymarquee').setAttribute('scrollamount', getvalue, 0);

}

我很好奇你有什么样的用例需要在单页浏览中不断改变字幕的速度。这是一个治疗师程序。