Asp.net MVC的繁忙指示器

时间:2018-12-30 08:41:46

标签: asp.net-mvc

是否可以在不使用AJAX的情况下实现占线指示器来指示用于表单回发调用的控制器的处理?

1 个答案:

答案 0 :(得分:0)

使用html尝试一下。在普通视图中添加。使用Java脚本在您想要的任何地方调用ID,例如 $(“#loading”)。show()显示和 $(“#loading”)。hide()隐藏

<div id="loading" style="display: none;">
    <table style="height: 100%; border: 0; width: 100%; position: fixed; top: 0; left: 0; background-color: #FAFAFA; opacity: 0.8; filter: alpha(opacity=80); z-index: 9000;">
        <tbody>
        <tr>
            <td style="width: 100%; text-align:center; vertical-align : middle;">                <div id="Loadingtext" style="font-family: Arial; font-size: 24px; opacity: 1; filter: alpha(opacity=100); font-weight: bold; color: #000000; text-align: center; padding-top: 5px;">Please wait</div>
            </td>
        </tr>
        </tbody>
    </table>
</div>