Quantcast
Channel: Últimos conteúdos
Viewing all articles
Browse latest Browse all 14190

Trocar Fundo div ao atualizar pagina

$
0
0
Estou tentando trocar a cor do fundo da minha div footer-area ao atualizar a pagina ir para uma cor diferente, porem não entendo mto, tentei fazer o seguinte código mas não deu certo:
 
 
var rodape = 4; 
 
ran = Math.round(Math.random() * (rodape-1))+1 
 
if (ran == (1)) { 
backgroundrodape=("url(//sandaliasgaia.com.br/site_novo/wp-content/themes/retro/images/skin/skin1/footer-area-bg.png) repeat scroll left top #00b9f2"); 
if (ran == (2)) { 
backgroundrodape=("url(//sandaliasgaia.com.br/site_novo/wp-content/themes/retro/images/skin/skin1/footer-area-bg.png) repeat scroll left top #72bf44") 
if (ran == (3)) { 
backgroundrodape=("url(//sandaliasgaia.com.br/site_novo/wp-content/themes/retro/images/skin/skin1/footer-area-bg.png) repeat scroll left top #2e3192") 
if (ran == (4)) { 
backgroundrodape=("url(//sandaliasgaia.com.br/site_novo/wp-content/themes/retro/images/skin/skin1/footer-area-bg.png) repeat scroll left top #ffce00") 
 
 
function carrega() { 
document.footerArea.style.background = backgroundrodape; 
</script> 

Viewing all articles
Browse latest Browse all 14190

Trending Articles