在提交表单之前,我希望启用所有被禁用的输入和选择元素,以便获取所有被禁用元素的值。
所以我尝试了:
所以我尝试了:
function enable() {
$('input[type="text"], input[type="checkbox"], select').prop("disabled", true).each(function () {
if ($(this).is(':disabled')) {
$(this).attr('disabled', false);
}
});
}
这段代码无法正常工作,你能帮我解决一下吗?
提前感谢您的帮助...
$('input[type="text"], input[type="checkbox"], select').removeProp('disabled')
- undefined