How can I disable an entire HTML page on an event like in the case of JavaScript alert?

后端 未结 5 2027
南笙
南笙 2021-01-13 05:08

I am developing a web page in JSP/HTML in which I have to disable/ \'gray screen\' an entire web page on a button click event so that an end user can\'t access the other ele

5条回答
  •  迷失自我
    2021-01-13 05:19

    The basic technique for this is to add a 100% width and height div on top of everything.

    $('body').append('
    ').css({ position: 'absolute', height: '100%', width: '100%', zIndex: '999' });

    Then make your modal window z-index: 1000.

提交回复
热议问题