...

View Full Version : using fonttypes in document.write



dutchie
10-08-2003, 11:04 AM
Hi, all

Is it possible, to use different types of 'fonts' in 'document.write',
and if so, how?

Thanks beforehands, for any response.

greetings,
dutchie

Kor
10-08-2003, 11:26 AM
Simply write the html (or CSS style) usual tags (atributes)

document.write('<font face=\"Arial\">text here</font>');
or
document.write('<div style=\"font-family:Arial\">text here</div>');

just take care that, in JavaScript, some characters, like " are special characters, so you have to use the backslash in front, to avoid code interpret them otherwise than part of a string.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum