• STATISTIQUES
  • Il y a eu un total de 0 membres et 7154 visiteurs sur le site dans les dernières 24h pour un total de 7 154 personnes!
    Membres: 2 605
    Discussions: 3 579
    Messages: 32 816
    Tutoriels: 78
    Téléchargements: 38
    Sites dans l'annuaire: 58


  • ANNUAIRE
  • [EN] social-engineer
    Site dédié au Social Engineering en général.
    Hacking
    [FR] Asp-php
    Tutoriaux sur ASP, PHP, ASP.net, XML, SQL, Javascript, HTML, VML - Scripts et ressources pour webmasters - Forums d&#...
    Programmation
    [FR] Infomirmo
    Challenge présenté sous la forme de 6 niveaux de difficultés diverses et variées avec chacun plusieurs chall...
    Challenges
    [FR] Secuser
    Actualité de la sécurité informatique, fiches virus et hoax, alertes par email, antivirus gratui...
    Hacking
    [FR] Le top web
    Nous offrons une sélection la plus large possible de resources webmaster gratuites, hébergement gratuit...
    Webmaster
    [EN] Reddit
    Subreddit dédié à la sécurité informatique.
    Hacking
    [FR] µContest
    µContest est un site de challenges de programmation, c'est à dire qu'il propose des épreu...
    Hacking

  • 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 : 3 visiteur(s)
N-PN
Accueil | Challenges | Tutoriels | Téléchargements | Forum | Retourner en haut