【发布时间】:2022-12-22 20:26:29
【问题描述】:
我正在研究 Reactjs/nextjs,我想附加/删除“禁用”属性,我该怎么做?这是我当前的代码
const handleSubmit = (e) => {
e.preventDefault();
//Should append "disable" on submit button
axios
.post("xxxxxxxxxxxxxxxxxxxxxxxxxxx",data
)
.then(function (response) {
//Should remove "disable" after response
}
});
}
<form className="row" id="home_contact_form" onSubmit={handleSubmit}>
<input type="submit" value="send" className="sendbtn" id="sendbtn" />
</form>
【问题讨论】:
-
这回答了你的问题了吗? Disabling and enabling a html input button
标签: javascript jquery reactjs next.js