• STATISTIQUES
  • Il y a eu un total de 1 membres et 6367 visiteurs sur le site dans les dernières 24h pour un total de 6 368 personnes!


    Membres: 2 445
    Discussions: 3 588
    Messages: 32 835
    Tutoriels: 78
    Téléchargements: 38
    Sites dans l'annuaire: 58


  • ANNUAIRE
  • [FR] Developpez.net
    Un forum communautaire qui se veut pour les développeurs en générale. Avec presque 500 000 membr...
    Programmation
    [EN] xda-developers
    Très bon site pour les gros bidouilleurs de smartphone de windows à androïd et de Apple jusqu'...
    Phreaking
    [EN] Hack This Site
    Hack This Site est considéré comme un réel terrain d'entraînement légal pour le...
    Hacking
    [FR] InfoMirmo
    Apprentissage de l'informatique par l'intermédiaire de challenges de sécurité. Venez app...
    Hacking
    [FR] Zmaster
    Articles sur l'informatique, le hacking, le P2P, les divx, les astuces windows XP, les GSM, Emule, la cryptograph...
    Hacking
    [EN] Lost-chall
    Site de challenge présenté sous la forme de différente saison. Pour passer une saison vous devez avoir accumul�...
    Challenges
    [FR] Le site du zero
    Découvrez gratuitement la programmation (C, C++, PHP, MySQL, XHTML, CSS...), Linux, le Mapping, la modé...
    Programmation

  • DONATION
  • Si vous avez trouvé ce site internet utile, nous vous invitons à nous faire un don du montant de votre choix via Paypal. Ce don servira à financer notre hébergement.

    MERCI!




Note de ce sujet :
  • Moyenne : 0 (0 vote(s))
  • 1
  • 2
  • 3
  • 4
  • 5
[Web] Changer le src d'un iframe régulièrement
19-05-2012, 13h44 (Modification du message : 19-05-2012, 19h58 par Booster2ooo.)
Message : #10
Booster2ooo Hors ligne
Contributeur
*****



Messages : 165
Sujets : 14
Points: 63
Inscription : Aug 2011
RE: PHP need help
15minutes:

Avec jQuery
Code :
<html>
    <head>
        <meta charset="utf-8" />
        <title>Site spinner demo | Booster2ooo@N-PN</title>
        <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script>
        <script type="text/javascript">
        $(document).ready(function() {
            var siteList = [
                                'http://n-pn.fr/forum/showthread.php?tid=2031'
                                , 'http://n-pn.fr/index.php?mod=tuto'
                                , 'http://n-pn.fr/index.php?mod=challenges'
                            ]
                , interval = 5000 // 5secs
                , buffer = siteList.slice(0)
            
                , next = function() {
                        if(buffer.length == 0) buffer = siteList.slice(0);
                        $('#iTarget').attr('src', buffer.shift());
                    }
                ;

            next();
            setInterval(function() { next() }, interval);
        });
        </script>
        
        <style>
            * {
                margin:0; padding:0;
            }
        </style>
    </head>
    <body>
        <iframe id="iTarget" name="iTarget" src="" frameborder="no" style="border: 0; width: 100%; height: 100%"></iframe>
    </body>
</html>

Javascript pur
Code :
<html>
    <head>
        <meta charset="utf-8" />
        <title>Site spinner demo | Booster2ooo@N-PN</title>
        <style>
            * {
                margin:0; padding:0;
            }
        </style>
    </head>
    <body>
        <iframe id="iTarget" name="iTarget" src="" frameborder="no" style="border: 0; width: 100%; height: 100%"></iframe>
    </body>
    <script type="text/javascript">
    var siteList = [
                        'http://n-pn.fr/forum/showthread.php?tid=2031'
                        , 'http://n-pn.fr/index.php?mod=tuto'
                        , 'http://n-pn.fr/index.php?mod=challenges'
                    ]
        , interval = 5000 // 5secs
        , buffer = siteList.slice(0)
    
        , next = function() {
                if(buffer.length == 0) buffer = siteList.slice(0);
                document.getElementById('iTarget').src = buffer.shift();
            }
        ;

    next();
    setInterval("next()", interval);
    </script>
</html>
+1 (0) -1 (0) Répondre


Messages dans ce sujet
RE: PHP need help - par EpicOut - 06-05-2012, 01h02
RE: PHP need help - par Booster2ooo - 06-05-2012, 10h16
RE: PHP need help - par romain95 - 06-05-2012, 11h11
RE: PHP need help - par Booster2ooo - 08-05-2012, 13h32
RE: PHP need help - par romain95 - 11-05-2012, 17h05
RE: PHP need help - par Di0Sasm - 11-05-2012, 19h40
RE: PHP need help - par romain95 - 15-05-2012, 17h30
RE: PHP need help - par Di0Sasm - 18-05-2012, 21h35
RE: PHP need help - par Booster2ooo - 19-05-2012, 13h44
RE: PHP need help - par supersnail - 19-05-2012, 17h11
RE: PHP need help - par Booster2ooo - 19-05-2012, 20h04

Atteindre :


Utilisateur(s) parcourant ce sujet : 2 visiteur(s)
N-PN
Accueil | Challenges | Tutoriels | Téléchargements | Forum | Retourner en haut