禁用html中的所有元素 [英] disable all the elements in html

查看:105
本文介绍了禁用html中的所有元素的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何通过javascript禁用html中的所有元素。最简单的方法...

解决方案

我建议做它是灯箱风格的方式。



在页面上方添加绝对定位的透明全屏div层。
这样,用户甚至不能点击一个链接。



为了给用户一个视觉反馈,说明页面被禁用,
你可以制作分区。 G。 50%透明黑色。


顺便说一句,这里还有一个 jQuery插件,它使用了类似的技术。


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

解决方案

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.

这篇关于禁用html中的所有元素的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆