使用jquery禁用页面中的所有控件 [英] disable all controls in the page using jquery

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

问题描述

如何使用jquery禁用页面中的所有控件(按钮,锚点,文本框等)。我需要这个来显示页面的预览,我不希望用户点击任何内容。

How to disable all the controls(buttons, anchor, textbox,...) in the page using jquery. I need this to show a preview of a page, in which i don't want to the user to click anything.

推荐答案

$("#id_button").attr("disabled","disabled");

$(".class_buttons").attr("disabled","disabled");

$(":input").attr("disabled","disabled");

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

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