Posted August 12th 2013, 11:02 pm
how to merge javascript code with css?
i need my code for javascript add some class about css
example this code
- Code:
function text() {
};
text = new text();
number = 0;
// textArray
text[number++] = "Random text string 1."
text[number++] = "Random text string 2."
text[number++] = "Random text string 3."
text[number++] = "Random text string 4."
text[number++] = "Random text string 5."
// keep adding items here...
increment = Math.floor(Math.random() * number);
document.write(text[increment]);
//-->
and i have this code to.
- Code:
document.write("<style type='text/css'>body {CSS inside}</style>");
please teach me about javascript, mainly about merging the code. :)
i need you help me again, thanks a lot bro mark, :D
Last edited by weeknight on August 13th 2013, 1:16 pm; edited 1 time in total