jquery - Random background colour picker for tumblr -


i've got in code, should select random background colour every refresh, can't see what's wrong document.write

var bgcolorlist=new array("#ff871b", "#15efa1", "#51ddff", "#ff1b6c", "#000000")    document.write('<meta name="color:background" content='+background=bgcolorlist[math.floor(math.random()*bgcolorlist.length)] + '>') 

cheers!

you need semicolons after each line.

additionally, why seeing background color meta tag?

use line instead:

  document.body.style.backgroundcolor = bgcolorlist[math.floor(math.random()*bgcolorlist.length)]; 

Comments

Popular posts from this blog

plot - Remove Objects from Legend When You Have Also Used Fit, Matlab -

java - Why does my date parsing return a weird date? -

Need help in packaging app using TideSDK on Windows -