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中文网其它相关文章!
![php中文网最新课程二维码](/static/images/article_wechat2021.jpg?1111)
声明:本文原创发布php中文网,转载请注明出处,感谢您的尊重!如有疑问,请联系admin@php.cn处理
- 上一篇:jquery 怎么下载
- 下一篇:jquery如何获取随机数不重复
网友评论
文明上网理性发言,请遵守 新闻评论服务协议
我要评论