((("photos/photo0"+Math.floor((Math.random()*2+1)))+".gif")); Math.floor(Math.random()*2+1) 得到的是1或者2所以得到的路径是photos/photo01.gif 或者 photos/photo02.gif