一种

var style=document.createElement("style");
style.type="text/css";
style.appendChild(document.createTextNode("body{background-color:red}"));
var head=document.head;
head.appendChild(style);

 

相关文章:

  • 2021-12-05
  • 2021-12-05
  • 2021-12-30
  • 2022-01-06
  • 2021-08-05
  • 2021-12-16
  • 2022-01-31
猜你喜欢
  • 2021-09-09
  • 2022-12-23
  • 2021-11-30
  • 2021-12-26
  • 2022-01-12
  • 2021-09-01
  • 2022-12-23
相关资源
相似解决方案