CSS dynamic loading of the three methods
Related Tags:
The first one: general use in the external CSS file must be loaded in the paper
@ Code import url (style.css); / * Can only be used in the CSS style tags in the document or in the * /
The second: a simple loading of the page in an external CSS document
Code document.createStyleSheet (cssFile); Third: createElement CSS method to create the Link label
Var head code = document.getElementsByTagName ( 'HEAD'). Item (0); Var style = document.createElement ( 'link');
Style.href = 'style.css';
Style.rel = 'stylesheet';
Style.type = 'text / css';
Head.appendChild (style);
I put here in the past several items used in the function, we hope that the useful!
Code function loadJs (file) ( Var scriptTag = document.getElementById ( 'loadScript');
Var head = document.getElementsByTagName ( 'head'). Item (0);
If (scriptTag) head.removeChild (scriptTag);
Script = document.createElement ( 'script');
Script.src = ".. / js / mi_" + + file. "Js";
Script.type = 'text / javascript';
Script.id = 'loadScript';
Head.appendChild (script);
)
Function loadCss (file) (
Var cssTag = document.getElementById ( 'loadCss');
Var head = document.getElementsByTagName ( 'head'). Item (0);
If (cssTag) head.removeChild (cssTag);
Css = document.createElement ( 'link');
Css.href = ".. / css / mi_" + + file. "Css";
Css.rel = 'stylesheet';
Css.type = 'text / css';
Css.id = 'loadCss';
Head.appendChild (css);
)
- Dynamic CSS, rejuvenate technology
- Site basic color - dynamic
- Dynamic HTML Q
- Dynamic effects of flash relief
- What is the Dynamic HTML
- Html in the form of dynamic operation
- The best example of dynamic HTML technology
- Dynamic changes in the CSS asp.net
- COOL and practical dynamic effects
- Google will index dynamic pages?
- Firework produced dynamic Banner
- FLASH dynamic fuzzy results
- Add to form dynamic javascript
- Fireworks produced by the dynamic effects of LOGO
- Interesting dynamic painting
- Implementation of dynamic page transition effects
- Ajax 2 Dynamic Menu
- Dynamic Configuration css!
- NoahWeb performance with the production of Dynamic Website
- Dynamic clusters provide e-mail
JScript data type

Jscript There are three main types of data, two types of data and two special data types. Main (basic) data type is: Boolean string numerical composite (quote) data type is: Object array of special data types are: Null Undefined Strin...
Pages on the layout of the interview

1. Page layout what is your favorite? Alistair Beattie: I would not like a separate Web site, others will not. I would like to judge quality of a web site should be the sole criterion for whether it is useful. But for the success of this W...
Making learning website: dotted line forms the production method

In the production of the website, often dotted line forms encountered production problems, the following article will be able to solve this problem. Method 1: 1 X2 for a plan. Half black half white, and make use of form lines. That approach, while tro...
Ajax structural analysis (article sets)

Ajax structure of the relevant articles 7 Total 2006 Web development trends 05.10.06 read: 30 from IT-man Ajax / Web 2.0. Outline what is fast? Through the following format automatically establish how: html.head.title = "Hello, World. "; html.body.form. @ name =" hello ";...
Cascading Style Sheets (CSS cascading style sheets)

CSS various attributes Font attributes Attribute attribute meaning of attribute values font-family what font to use all of the fonts font-style font whether italics Normal, italic, font oblique font-variant whether capital Normal body, the small-caps font-weight d...