开发者

Firefox Extension - Add Element to Body

开发者 https://www.devze.com 2023-03-08 22:53 出处:网络
I want to add a element to 开发者_如何学编程the body in my Firefox Extension per javascript. document.write(\"ads\");

I want to add a element to 开发者_如何学编程the body in my Firefox Extension per javascript. document.write("ads"); doesn't work. - no result in the sourcecode. I'm sure the JS is executed, because I have an alert(); on this place. It's possible?

/edit: have to use content.document.write


You should use this code to inject element into HTML:

document.body.appendChild
0

精彩评论

暂无评论...
验证码 换一张
取 消