Last active
February 2, 2016 22:13
-
-
Save htakeuchi/0e50daf0e91fa15defa8 to your computer and use it in GitHub Desktop.
スタイルシートを動的に読み込む
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function addStyleSheet(href) { | |
var link = document.createElement("link"); | |
link.setAttribute("rel", "stylesheet"); | |
link.setAttribute("type", "text/css"); | |
link.setAttribute("href", href); | |
var head = document.getElementsByTagName("head")[0]; | |
head.appendChild(link); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment