Wait cursor over entire html page

后端 未结 14 1313
离开以前
离开以前 2020-12-02 14:19

Is it possible to set the cursor to \'wait\' on the entire html page in a simple way? The idea is to show the user that something is going on while an ajax call is being com

14条回答
  •  伪装坚强ぢ
    2020-12-02 14:46

    To set the cursor from JavaScript for the whole window, use:

    document.documentElement.style.cursor = 'wait';
    

    From CSS:

    html { cursor: wait; }
    

    Add further logic as needed.

提交回复
热议问题