JavaScript:动态引入 .css 文件 作者:马育民 • 2022-08-05 12:18 • 阅读:10072 ``` // 引入dialog.css !function(){ var link = document.createElement("link"); link.rel = "stylesheet"; link.type = "text/css"; link.href = "./css/dialog.css"; var head = document.getElementsByTagName("head")[0]; head.appendChild(link); }() ``` 原文出处:http://malaoshi.top/show_1IX3o3XAQj4w.html