Create tag html in head with a simple trick in JavaScript
document.createElement("style") functionalso you don't need to call head tag to innerHTML in head tag, this simple and useful code can you use to JavaScript let's start.
we need to this example setTimeout function to explain how it's work, settimeout not interest to make that, just for explain.
you need just this code:
document.head.innerHTML+="<style>body{background:red}<\/style>"

© Manajmnt code
Comments
Post a Comment
message