function addCSS(cssText) {var style = document.createElement('style');
var head = document.head || document.getElementsByTagName('head')[0];
style.type = 'text/css';
if (style.styleSheet) {
// 兼容 ie
var func = function() {
try {style.styleSheet.cssText = cssText} catch (e) {}};
if (style.styleSheet.disabled) {setTimeout(func, 10)
} else {func()
}
} else {var textNode = document.createTextNode(cssText);
style.appendChild(textNode)
};
head.appendChild(style)
};
addCSS("*{margin: 0;padding: 0;}")
document.write('<div> 我是小霸王悠悠 </div>')