/    Sign up×
Community /Pin to ProfileBookmark

Background image change on refresh?

Hey, can someone help me, I’m trying to help someone who wants their background image to change each time the page is refreshed, it needs to be in JavaScript or Ajax, I don’t mind, it just needs to be client-side…

I’ve played around with all of the random image codes, etc, but I still don’t seem to be getting anywhere…

I know CSS isn’t static so theres no point trying there….

I need someone along the lines of <body bg image={image[1][[url]http://example.com/image.PNG[/url]….

Thanks,
Dylan

to post a comment
JavaScript

2 Comments(s)

Copy linkTweet thisAlerts:
@budsterJul 21.2008 — Hi, This javascript example is for changing the background image daily, but also explains how to have a completely random background.

http://www.astral-consultancy.co.uk/cgi-bin/hunbug/doco.cgi?11500

Hope this helps
Copy linkTweet thisAlerts:
@dylanparrinauthorJul 21.2008 — Thansks, thats the code I need ?
×

Success!

Help @dylanparrin spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.5,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,

tipper: @Samric24,
tipped: article
amount: 1000 SATS,
)...