|
楼主 |
发表于 2009-1-28 23:47:28
|
显示全部楼层
Thanks for sharing this to us.
I just started learning javascript and css for web development, I was thinking, since you can invoke javascript function call from the css, why not give it a function like
function changebackground(testid ) {
document.getElementById(testid).style.background=url(' pix/test'+(parseInt(Math.random()*5)+1)+'.gif'))';
}
Then call it from the css on the testid which you wanna change the background image?
that's just my thought, I haven't tested it yet, so it might be totally wrong, if you know why it won;t work, could you please kindly drop me a message?
I really wanted to learn from you guys ...thank you |
|