Use inline style
parent
ff2a393331
commit
f4936c622f
10
util.js
10
util.js
|
@ -332,7 +332,7 @@ window.curStyle = function(e)
|
|||
return window.getComputedStyle ? getComputedStyle(e) : e.currentStyle;
|
||||
};
|
||||
|
||||
window.addCSS = function(url)
|
||||
window.addStylesheet = function(url)
|
||||
{
|
||||
var s = document.createElement('link');
|
||||
s.setAttribute('rel', 'stylesheet');
|
||||
|
@ -340,3 +340,11 @@ window.addCSS = function(url)
|
|||
s.setAttribute('href', url);
|
||||
document.getElementsByTagName('head')[0].appendChild(s);
|
||||
};
|
||||
|
||||
window.addCSS = function(css)
|
||||
{
|
||||
var s = document.createElement('style');
|
||||
s.setAttribute('type', 'text/css');
|
||||
s.innerHTML = css;
|
||||
document.getElementsByTagName('head')[0].appendChild(s);
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue