Hola
amms
Prueba este código:
Código PHP:
<html>
<head>
<script type="text/javascript">
function ini() {
var colores = ['red', 'green', 'blue'];
var imagenes = ['imagen1.jpg', 'imagen2.jpg', 'imagen3.jpg']
num = Math.floor(Math.random()*colores.length)
document.body.style.background = colores[num];
document.getElementById('ima').src = imagenes[num];
}
</script>
</head>
<body onload="ini()">
<img src="" id="ima" />
</body>
</html>
Saludos,