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

image - ClassNotFoundException when add a prebuilt apk into system.img in android -

I need to import mysql 5.1 to 5.5? -

Java, Hibernate, MySQL - store UTC date-time -