1

HTML

<body>
    <div id="progressbar"></div>
</body>

Jクエリ

$(document).ready(function() {
           $( "#progressbar" ).progressbar({ value: 5 });
        });

NewServlet で

int percentage=5;
//Code Snippet; 
percentage=25; //at line# 200
//Code Snippet; 
percentage=50; //at line# 1004
//Code Snippet; 
percentage=75; //at line# 5006
//Code Snippet; 
percentage=100; //at line# 7000
//Code Snippet; 

特定のコード行が実行され、進行状況バーの値が突然更新されるため、これらの値 (パーセンテージ) をサーブレットから jauery に更新するにはどうすればよいですか?

4

1 に答える 1

0

You probably can try to manually flush out your percentage value and update the value in jQuery progressbar plugin.

I am not sure what exactly your intention of using the progress bar is. Usually, progress bar is good in the cases where user needs to upload a file, execute timed tasks, etc.

You might want to take a look at this post, which I think is quite insightful.

于 2012-10-21T02:31:27.243 に答える