Home >Web Front-end >JS Tutorial >jquery disable button (enable, disable button)
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");
Enable button:
$("#id").removeAttr("disabled"); $("#id").attr("disabled",false);
Note:
1、$("#id").attr("disabled","false");不起作用 2、disabled只能禁用button,对超链接不起作用
For more related tutorials visit JavaScript Video tutorial