css
display:none にしておいた div の innerHTML に '<span> </span><style type="text/css">' + css + '</style>' を代入する方法もありますが、それ以外の方法です。追加する場合。 function addStyle(css) { var style = document.getElementById("dynamic-style"); if (!style) { style = document.…