- How to dynamically call css path in head section of an html page
- function addCSS() {
- var headtg = document.getElementsByTagName('head')[0];
- if (!headtg) {
- return;
- }
- var linktg = document.createElement('link');
- linktg.type = 'text/css';
- linktg.rel = 'stylesheet';
- linktg.href = 'CSS/RoundCorners.css';
- linktg.title = 'Rounded Corners';
- headtg.appendChild(linktg);
- }