This Blog is deleting...

Please go to my new Blog:

http://itnews24h.blogspot.com


Loading...
Custom Search

Sunday, October 12, 2008

Change Background image (Blogger/Blogspot)




Here's a start. See how you get on with this.


Code:

<BODY background="startImage.jpg">

<input type = "button" name = "img1" id = "img1" value = "Image 1" onclick = "changeBGImage(0)">
<input type = "button" name = "img2" id = "img2" value = "Image 2" onclick = "changeBGImage(1)">

<input type = "button" name = "img3" id = "img3" value = "Image 3" onclick = "changeBGImage(2)">
<input type = "button" name = "img4" id = "img4" value = "Image 4" onclick = "changeBGImage(3)">

<script type = "text/javascript">

var backImage = new Array();
backImage[0] = "11.jpg";
backImage[1] = "22.jpg";
backImage[2] = "33.jpg";
backImage[3] = ""; // = no background image

function changeBGImage(whichImage){
if (document.body){
document.body.background = backImage[whichImage];
}
}

</script>

BTW, the time to say "thanks" is afterwards, not beforehand which gives the impression that you take other people's assistance for granted. Or as British politician Neil Kinnock put it, "Don't belch before you have had the meal." Prefer to use "please" beforehand and if you find a response helpful then you can use the "Thank You For This Post" button.


No comments:

Post a Comment

------------------------------

Related Articles