var link = document.getElementsByTagName('link')[0]; var sheet = link.sheet || link.styleSheet; //兼容ie