Ver Mensaje Individual
  #6 (permalink)  
Antiguo 24/10/2016, 21:45
norlan30
 
Fecha de Ingreso: diciembre-2013
Ubicación: Nicaragua
Mensajes: 32
Antigüedad: 10 años, 4 meses
Puntos: 1
Respuesta: hacer funcionar autoclick

aquí otra manera .
Código HTML:
Ver original
  1. <div id="yt"></div><br>

Código Javascript:
Ver original
  1. var direcciones = new Array(
  2. "10000","15000","8000","5000","1500","5000" //tiempo de espera en segundos aletorio
  3. )
  4. function Aleatorio(){
  5. aleat = Math.random() * direcciones.length;
  6. aleat = Math.floor(aleat);
  7. return direcciones[aleat];
  8. }
  9.  
  10. function autoClick() {
  11.     setTimeout(function () {
  12.         document.getElementById('yt').click();
  13.     }, Aleatorio());
  14. };