Home > Web Front-end > JS Tutorial > jquery disable button (enable, disable button)

jquery disable button (enable, disable button)

PHPz
Release: 2018-10-10 16:54:14
forward
2502 people have browsed it

This article mainly talks about buttons in jquery, as well as the activation and disabling of buttons. Interested friends, please continue reading

Disable button:

$("#id").attr("disabled","true");
$("#id").attr("disabled",true);
$("#id").attr("disabled","disabled");
Copy after login

Enable button:

$("#id").removeAttr("disabled");
$("#id").attr("disabled",false);
Copy after login

Note:

1、$("#id").attr("disabled","false");不起作用
2、disabled只能禁用button,对超链接不起作用
Copy after login

For more related tutorials visit JavaScript Video tutorial

Related labels:
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template