开发者

Update information as needed

On the page I have a list of HTML-elements, each element has its status:

<ul>
    <li>
        <span class='status'>ok</span>
        <span class='content'>content1</span>
    </li>
    <li>
        <span class='status'>not ok</span>
        <span class='content'>content2</span>
    </li>
    <li>
        <span class='status'>ok</span>
        <span class='content'>content3</span>
    </li>
</ul>

This list is very big.

I need to update the status (without reloading the page).

What are the ways to do this?

I wanted to use AJAX开发者_如何学JAVA. And periodically poll the database and get out status, etc. What could be more options?

Update1:

I think that the use of Ajax in this way is not very good: the status change very rarely, and a list of objects is large.


Without reloading the page? AJAX seems to be current best practice. Or you can use an iframe.


I think AJAX is the best choice for you. You can use Jquery (a javascript framework) for AJAX functionality.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜