📜  在 javascript 代码示例中添加按钮

📅  最后修改于: 2022-03-11 15:02:38.257000             🧑  作者: Mango

代码示例1
// The code below should help
let btn = document.createElement("button");
btn.innerHTML = "Submit";
btn.type = "submit";
btn.name = "formBtn";
document.body.appendChild(btn);