jquery设置不可点击的方法:首先打开相应的代码文件;然后通过“$("input").attr('readonly', true);$("textarea").attr('readonly', true);”方法设置页面元素不可点击即可。
推荐:《jquery视频教程》
本教程操作环境:windows7系统、jquery3.2.1版本,该方法适用于所有品牌电脑。
jquery 设置页面元素不可点击、不可编辑、只读
代码如下:
$("input").attr('readonly', true); $("textarea").attr('readonly', true); $(':radio').attr('disabled', true); $(':checkbox').attr('disabled', true); $(':button').attr('disabled', true); $('a').removeAttr('onclick'); $('select').attr('disabled', true);
以上就是jquery如何设置不可点击的详细内容,更多请关注php中文网其它相关文章!
每个人都需要一台速度更快、更稳定的 PC。随着时间的推移,垃圾文件、旧注册表数据和不必要的后台进程会占用资源并降低性能。幸运的是,许多工具可以让 Windows 保持平稳运行。
Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号