您的位置:首页 > 技术中心 > 前端框架 >

jquery如何设置不可点击

时间:2020-11-23 11:00

jquery设置不可点击的方法:首先打开相应的代码文件;然后通过“$("input").attr('readonly', true);$("textarea").attr('readonly', true);”方法设置页面元素不可点击即可。

推荐:《jquery视频教程》

  • 该方法适用于所有品牌的电脑。

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如何设置不可点击的详细内容,更多请关注www.gxlsystem.com其它相关文章!

本类排行

今日推荐

热门手游