begin process at 2010 03 20 04:29:54
  Trouver un code source :
 
dans
 
Accueil > 

Code

 > 

Trucs & Astuces

 > VOUS ETES SURVEILLER

VOUS ETES SURVEILLER


 Information sur la source

Note :
6 / 10 - par 5 personnes
6,00 / 10

  • 1

  • 2

  • 3

  • 4

  • 5

  • 6

  • 7

  • 8

  • 9

  • 10
Catégorie :Trucs & Astuces Niveau :Initié Date de création :20/04/2001 Vu / téléchargé :24 918 / 854

Auteur : patoch

Ecrire un message privé
Site perso
Commentaire sur cette source (3)
Ajouter un commentaire et/ou une note

 Description

Des yeux qui suivent votre curseur
tres bel effet dans une page web

Source

  • <html>
  • <head>
  • <style type="text/css">
  • <!--
  • left: 0px;
  • top: 0px}
  • -->
  • </style>
  • <script language="JavaScript1.2">
  • <!-- Masqué pour les anciens navigateurs
  • //Coordonneés des yeux
  • posX = 350;
  • posY = 150;
  • function placer (e, x, y, v) {
  • e.left = x;
  • if (e.style)
  • e.style.left = x;
  • e.top = y;
  • if (e.style)
  • e.style.top = y;
  • e.visibility = v;
  • if (e.style)
  • e.style.visibility = v;
  • }
  • function init () {
  • if (document.all)
  • placer (document.all.Pos1, posX, posY, "visible");
  • else
  • placer (document.Pos1, posX, posY, "visible");
  • }
  • function MoveNS (Evenement) {
  • regarder (document.Pos1,
  • Evenement.pageX-50,
  • Evenement.pageY-50);
  • }
  • if (document.layers) {
  • window.captureEvents (Event.MOUSEMOVE);
  • window.onMouseMove = MoveNS;
  • }
  • function moveIE () {
  • regarder (document.all.Pos1, event.x-50, event.y-50);
  • }
  • function regarder (e, x, y) {
  • if ((x > posX + 100) && (y < posY))
  • e.document.yeux.src = "images/yeux1.jpg";
  • if ((x > posX + 100) && (y > posY) && (y < posY + 100))
  • e.document.yeux.src = "images/yeux2.jpg";
  • if ((x > posX + 100) && (y > posY + 100))
  • e.document.yeux.src = "images/yeux3.jpg";
  • if ((x > posX) && (x < posX + 100) && (y < posY))
  • e.document.yeux.src = "images/yeux8.jpg";
  • if ((x > posX) && (x < posX + 100) && (y > posY) && (y < posY + 100))
  • e.document.yeux.src = "images/yeux9.jpg";
  • if ((x > posX) && (x < posX + 100) && (y > posY + 100))
  • e.document.yeux.src = "images/yeux4.jpg";
  • if ((x < posX) && (y < posY))
  • e.document.yeux.src = "images/yeux7.jpg";
  • if ((x < posX) && (y > posY) && (y < posY + 100))
  • e.document.yeux.src = "images/yeux6.jpg";
  • if ((x < posX) && (y > posY + 100))
  • e.document.yeux.src = "images/yeux5.jpg";
  • }
  • // -- Le reste n'est pas caché -->
  • </script>
  • </head>
  • <body bgcolor="
  • <div id="Pos1"><img src="images/yeux9.jpg" name="yeux" width=100 height=100></div>
  • <center>
  • <h1><font color="red">Attention !</h1></font>
  • On vous observe ?</center>
  • </body>
  • </html>
<html>
  <head>


    <style type="text/css">
    <!--
                 left: 0px;
           top: 0px}
    -->
    </style>
  

    <script language="JavaScript1.2">
    <!-- Masqué pour les anciens navigateurs

    //Coordonneés des yeux
    posX = 350;
    posY = 150;


    function placer (e, x, y, v) {
 
      e.left = x;
      if (e.style)
        e.style.left = x;
     
      e.top = y;
      if (e.style)
        e.style.top = y;
     
      e.visibility = v;
        if (e.style)
        e.style.visibility = v;
    }

    function init () {
       
      if (document.all)
        placer (document.all.Pos1, posX, posY, "visible");
      else
        placer (document.Pos1, posX, posY, "visible");
    }


    function MoveNS (Evenement) {

      regarder (document.Pos1,
            Evenement.pageX-50,
            Evenement.pageY-50);
    }

    if (document.layers) {
      
      window.captureEvents (Event.MOUSEMOVE);
      window.onMouseMove = MoveNS;
    }
      

    function moveIE () {
    
      regarder (document.all.Pos1,  event.x-50,  event.y-50);     
    }
    
    
    
    function regarder (e, x, y) {
    
      if ((x > posX + 100) && (y < posY))
        e.document.yeux.src = "images/yeux1.jpg";
      if ((x > posX + 100) && (y > posY) && (y < posY + 100))
        e.document.yeux.src = "images/yeux2.jpg";
      if ((x > posX + 100) && (y > posY + 100))
        e.document.yeux.src = "images/yeux3.jpg";

      if ((x > posX) && (x < posX + 100) && (y < posY))
        e.document.yeux.src = "images/yeux8.jpg";
      if ((x > posX) && (x < posX + 100) && (y > posY) && (y < posY + 100))
        e.document.yeux.src = "images/yeux9.jpg";
      if ((x > posX) && (x < posX + 100) && (y > posY + 100))
        e.document.yeux.src = "images/yeux4.jpg";


      if ((x < posX) && (y < posY))
        e.document.yeux.src = "images/yeux7.jpg";
      if ((x < posX) && (y > posY) && (y < posY + 100))
        e.document.yeux.src = "images/yeux6.jpg";
      if ((x < posX) && (y > posY + 100))
        e.document.yeux.src = "images/yeux5.jpg";
    }
    
    // -- Le reste n'est pas caché -->
    
    </script>
  
  </head>
  
  <body bgcolor="  

  <div id="Pos1"><img src="images/yeux9.jpg" name="yeux" width=100 height=100></div>

  <center>
  <h1><font color="red">Attention !</h1></font>
  On vous observe ?</center>
  
  </body>
</html>

 

 Conclusion

N'oubliez pas de crée un dossier IMAGES


 Sources du même auteur

DES INFO-BULLES ORIGINALS
SUPERBE TEXTE DÉFILANT
Source avec Zip MENU EXPLORER

 Sources de la même categorie

HTML_ENTITIES_DECODE par zen69
ACCÈS À LA MÉTHODE SETATTRIBUTE('STYLE','') SOUS IE6 par masternico
OUTIL DE SÉLECTION par jdmcreator
Source avec Zip SIMPLIFIER LA CREATION DYNAMIQUE D'ELEMENT HTML par kazma
DÉTECTER SI CSS EST ACTIVÉ par jdmcreator

Commentaires et avis

Commentaire de WakBlack le 12/11/2002 18:55:28

Trop lolllllllllllllllllllllllll
Fodrait ptet lavoir ton image YEUX qui se trouve dans
images/yeux9.jpg
lollll
sinon c bien lol

Commentaire de TonicFlash33 le 18/03/2003 05:40:55

C?est bien drôle !!!
Merci

Commentaire de homelaet le 30/09/2005 12:14:12

moi j'adore

 Ajouter un commentaire




Nos sponsors


Sondage...

Comparez les prix

CalendriCode

Mars 2010
LMMJVSD
1234567
891011121314
15161718192021
22232425262728
293031    

Consulter la suite du CalendriCode

Photothèque

 
Développement réalisé par Nicolas SOREL (Nix) avec l'aide de : Cyril DURAND et Emmanuel (EBArtSoft), Merci à Vincent pour ses précieux conseils.
CodeS-SourceS.com© Toute reproduction même partielle est interdite sauf accord écrit du Webmaster
CodeS-SourceS.com© est une marque déposée tous droits réservés

Google Coop CodeS-SourceS Google Coop CodeS-SourceS
Temps d'éxécution de la page : 0,390 sec (4)

Nous contacter | Annoncer sur CodeS-SourceS | Mentions légales