Try following code:


<script>
function change(bg) {
document.body.style.backgroundImage = bg;
document.body.style.backgroundPosition = "top center";
document.body.style.backgroundRepeat = "no-repeat";
}
</script>
<input type="button" value="Pattern1" onClick="change('background.png') />";
Like it on Facebook, Tweet it or share this topic on other bookmarking websites.
Thanks for sharing a knowledgeable thing with us but if you could have explained the code we would have followed it more.. :lol: :)
Abhishek,
It really makes me remember my college days when I write programs in java script for small projects.Thanks buddy. :) :)
You do not have permissions to reply to this topic.