Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    New Coder
    Join Date
    Aug 2005
    Posts
    13
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Find words in HTML pages

    I want to be able to insert a document.write function into a HTML page. I want to do this after the <body> tag. Is there a way to do this so after the <body> tag is found I automatically insert the document.write tag into the page.

    This document.write will be a javascript function that changes the color of the background.

    I must emphasize I want to do this dynamically like on any HTML page I bring up, that code will be inserted.

  • #2
    Regular Coder
    Join Date
    Jun 2002
    Location
    Flint, Michigan, USA
    Posts
    620
    Thanks
    1
    Thanked 20 Times in 20 Posts
    I can't make it dynamic, but I can make it easy. Create a new bookmark whose value is:

    javascript:document.bgColor='#ccccff';void(0);

    Feel free to use any other color that you wish, but notice that "bgColor" has an upper-case "C" in the middle of lower-case letters.

    Once you have a page displayed on your screen, activate the bookmark which you created above.


  •  

    Posting Permissions

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