|
Blue Forest http://www.lslnet.com at 6:28 p.m. on August 22, 2006
Javascript problem Inquiries Addendum procedures, the following functions :
Web pages can be opened at random background replacement.
Document regular photographs.
Wish to use Javascript language |
Help! |
Hard to find good, it was transferred to?
Sorry, did not see themselves. |
[html]
"Body onload=" document.body.background= 'icon/icon' +Math.ceil (Math.random () * 17) + '. Gif ' ""
[/html] |
Never understand. . . . |
Math.ceil (Math.random () * 17)
Ceil rounded (ceil roof) floor flooring
Math.random be among the minority 0-1
Math.ceil (Math.random () * 17) -> Integer be between 0-17. |
Single quotation marks should be inside right path, but I changed, no. |
He wrote the request is
Icon/icon0.gif
Icon/icon1.gif
Icon/icon2.gif
Icon/icon3.gif
Icon/icon4.gif |
I wrote a complete path and name, it's useless to 1024-013.jpg images were 1024-00.jpg |
It should be
"Body onload=" document.body.background= 'path /1024-0' +Math.round (Math.random () * 13) + '. Gif ' "" |
Xiegang how to use this? I would not be another? I try. |
You \? If you use a local or LAN, using the absolute address, it will have Fanxiegang |
!
But why?
On such a small difference. . . |
We thank prawn. |
"Body onload=" document.body.background= 'path' +Math.Round (Math.Random () * (nm) +m) + '. Gif ' ""
The results show the number of your pictures, the integer n] |
|