disable all the elements in html

后端 未结 8 1225
清歌不尽
清歌不尽 2020-12-14 09:13

How can we disable all the elements in html through javascript.The easiest way...

8条回答
  •  隐瞒了意图╮
    2020-12-14 09:28

    I suggest to do it the "Lightbox"-style way.

    Add an absolute positioned, transparent, full screen div Layer above the Page. This way, the user can't even click on a Link.

    To give the user a visual feedback that the page is disabled, you can make the div e. g. 50% transparent black.

    BTW, here is also a jQuery Plugin that uses a similar technique.

提交回复
热议问题