Backgrounds in Javascript

This is a discussion on "Backgrounds in Javascript" within the JavaScript Forum section. This forum, and the thread "Backgrounds in Javascript are both part of the Program Your Website category.



Go Back   Webforumz.com > Main Forums > Program Your Website > JavaScript Forum

Notices


Reply
 
LinkBack Thread Tools
  #1 (permalink)  
Old Jan 22nd, 2007, 00:13
Junior Member
Join Date: Aug 2005
Posts: 15
Thanks: 0
Thanked 0 Times in 0 Posts
Backgrounds in Javascript

Is it possible to change the page, or table item, background color or image through Javascript.
Reply With Quote

  #2 (permalink)  
Old Jan 22nd, 2007, 11:51
Ryan Fait's Avatar
SuperMember

SuperMember
Join Date: May 2006
Location: Las Vegas
Posts: 3,786
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Backgrounds in Javascript

Yes.

document.getElementById("element").style.backgroun dColor = "red";
document.getElementById("element").style.backgroun d = "red url('image.jpg') no-repeat";

<div id="element">

</div>
Reply With Quote
Reply

Tags
backgrounds

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
two backgrounds! can it be done? christopher Web Page Design 6 Mar 9th, 2008 11:20
web backgrounds danny322 Graphics and 3D 3 Mar 7th, 2008 09:38
Hmm I Need Two Backgrounds !! bruno89 Web Page Design 8 May 11th, 2007 14:26
Web Backgrounds jimz Graphics and 3D 12 Mar 8th, 2006 22:27
Stretching Backgrounds ed@thehaunting.net Flash & Multimedia Forum 1 Apr 7th, 2004 13:54


All times are GMT. The time now is 00:08.


Powered by vBulletin®
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC8
© 2003-2008 Webforumz.com : All Rights Reserved

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43