更新时间:2023-12-05 17:49:58
好,我知道这可行:
let elem = document.querySelector ( 'css-selector (id or class)' )
那应该给你你的元素.然后,您可以这样做:
That should give you your element. Then you do this:
elem.innerHTML = elem.innerHTML + myNewStuff;
这会将您的html附加到该元素的innerHTML上.我很快尝试了一下,它起作用了.
That'll append your html to the innerHTML of the element. I tried it quickly, it works.