We can also use setAttributes on the element that already exists. Just like this: const el = document.getElementById("element"); el.setAttribute("onclick" ...
確定! 回上一頁