PDA

View Full Version : Simple .js file Font Question



Hugh Betcha
17 Aug 2006, 02:00 PM
Hello,
Have a web page that references an external .js file with code like this:
}

function num_jse() {
document.write(co);
}

The font displays as Times, but I prefer Arial. Do I need to put a <font> tag in my html before it references the .js file or is there a way I can put some code right in the .js file to make it Arial? The webpage uses a style sheet with Arial as the main font and I want the .js to write with Arial too.

Thanks!!

Rambo Tribble
19 Aug 2006, 08:14 AM
Anything that can be put in an HTML page, deprecated font tags, CSS styles, even a proper DOCTYPE declaration, a head, a page title, meta tags, a style sheet, all can be written to the page with document.write. Document.write, however, is not valid in XHTML and the W3C DOM's node manipulation methods are preferred, as is even innerHTML.