📌  相关文章
📜  preventdefault javascript 代码示例

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

代码示例5
document.querySelector("#id-checkbox").addEventListener("click", function(event) {
         document.getElementById("output-box").innerHTML += "Sorry! preventDefault() won't let you check this!
"; event.preventDefault(); }, false);