I have this code below and I need the link inside the iframe to change every refresh of the page and I did it as below only that it did not work only works with clickable link ... like this in the code
<html>
<head>
<title>Link Aleatorio</title>
<script>
var enderecos = new Array("http://www.terra.com.br", "http://www.google.com.br", "http://jbonline.terra.com.br", "http://www.lycos.com", "http://br.yahoo.com", "http://www.altavista.com", "http://www.hotbot.com", "http://www.buscopio.com", "http://oglobo.globo.com", "http://www.excite.com", "http://br.cade.yahoo.com", "http://www.mercadolivre.com.br", "http://br.weather.com", "http://www.buscape.com.br", "http://www.msn.com", "http://www.astrolabio.net")
function linkAleatorio(){
aleat = Math.random() * enderecos.length
aleat = Math.floor(aleat)
window.location=enderecos[aleat]
}
</script>
</head>
<body>
<!--<a href="javascript:linkAleatorio()">LinkAleatorio</a>-->
<iframe src="<?php echo javascript:linkAleatorio(); ?>" width="100%" height="100%" frameborder="0" scrolling="yes" allowfullscreen></iframe>
</body>
</html>