Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/javascript/368.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

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/jquery/68.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
Javascript 使用inner.html.data更新jQueryUI进度条_Javascript_Jquery_Ajax - Fatal编程技术网

Javascript 使用inner.html.data更新jQueryUI进度条

Javascript 使用inner.html.data更新jQueryUI进度条,javascript,jquery,ajax,Javascript,Jquery,Ajax,我这里有基本的jQueryUI进度条形码 <script> $(function() { $("#progressbar").progressbar({ value: 50, }); }); </script> 然后更新此文件的inner.html <div id="progressbar">&nbsp;</div> 我需要的是进度条按照进度条div中更新的值移

我这里有基本的jQueryUI进度条形码

<script>
    $(function() {
        $("#progressbar").progressbar({
            value: 50,
        });
    });
</script>
然后更新此文件的inner.html

<div id="progressbar">&nbsp;</div>

我需要的是进度条按照进度条div中更新的值移动。这可能吗?如果是,怎么做?如果需要,我还可以向script.js页面添加代码

谢谢

document.getElementById('progressbar').innerHTML = iPercentComplete.toString();
$( "#progressbar" ).progressbar({value: iPercentComplete});
有关动画,请参见:

试过了,progressbar div变为%amount,但实际条上没有任何移动,只是保持为白色。我是否可以将script.js文件中的数据直接返回到jquery中?我想有一种方法,但如果看不到代码,很难回答使用第一种方法如何,但是,让条形图动画化,使其与接收到的值平滑地上升。尝试后,progressbar div将更改为%amount,但实际条形图上没有任何移动,只是保持白色
document.getElementById('progressbar').innerHTML = iPercentComplete.toString();
$( "#progressbar" ).progressbar({value: iPercentComplete});
$( "#progressbar" ).progressbar( "value" , iPercentComplete.toString() );