Results 1 to 2 of 2

Thread: Simple .js file Font Question

  1. #1
    Join Date
    Jun 2006
    Posts
    12

    Simple .js file Font Question

    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!!

  2. #2
    Join Date
    Jun 2004
    Posts
    173
    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.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •