Docsity

Notes sur JavaScript, Notes de Application informatique

Toggle sidebar
bg1
Danse Didier
H.E. Rennequin Sualem - 12 - Travail de fin d’études
Département Informatique 2004 - 2005
JavaScript

         
  
       
            
            
   !      
!  "  #!
   
# !               
$    %           
      &     
    !
'   !  
    ' ( )       * ) 
  +, 
pf3
pf4
pf5

Aperçu partiel du texte

Télécharge Notes sur JavaScript et plus Notes au format PDF de Application informatique sur Docsity uniquement!

H.E. Rennequin Sualem - 12 - Travail de fin d’études

JavaScript

H.E. Rennequin Sualem - 13 - Travail de fin d’études

H.E. Rennequin Sualem - 15 - Travail de fin d’études

this.ver=navigator.appVersion;  ?        @  this.dom=document.getElementById?1:0;  #     /0         @  this.ie6=(this.ver.indexOf("MSIE 6")>-1 && this.dom)?1:0;  #    :  0     )1   -    '3 2</@  this.ie5=((this.ver.indexOf("MSIE 5")>-1 || this.ie5 || this.ie6) && this.dom)?1:0;  #    :  0     21     @  this.ie4=(document.all && !this.dom)?1:0;  #    :  0     31@  this.ns5=(this.dom && parseInt(this.ver) >= 5) ?1:0;  #    :  2   @  this.ns4=(document.layers && !this.dom)?1:0;  #    :  3   @  this.ie4plus=(this.ie6 || this.ie5 || this.ie4);  #    :  0     31   @  this.ie5plus=(this.ie6 || this.ie5)  #    :  0     21   @

H.E. Rennequin Sualem - 16 - Travail de fin d’études

this.bw=(this.ie6 || this.ie5 || this.ie4 || this.ns4 || this.ns5);  #     :       @  '  "  )             >  bw = new checkBrowser();  #                                          #                if (!document.getElementById) { document.getElementById = getObjectById; }             3  A'     3         8 ! A'                       function getObjectById(ID) { var obj; if (bw.dom) return document.getElementById(ID); else if (bw.ie4) return document.all(ID); else if (bw.ns4) return eval('document.' + ID); }  A         8 ! A'     "       '          )            B >  function test() { If (fonctionUtilisee) fonctionUtilisee(); else alert(‘Fonction inexistante, merci de prévenir le webmaster.’);

}

H.E. Rennequin Sualem - 18 - Travail de fin d’études

function hide(obj) { if (!getObjectStyle) return; if (theObj = getObjectStyle(obj)) theObj.display = 'none'; }

function show(obj) { if (!getObjectStyle) return; if (theObj = getObjectStyle(obj)) theObj.display = 'block'; }

function showhide(obj) { if (!getObjectStyle) return; if ( !show) return; if ( !hide) return; if (theObj = getObjectStyle(obj)) { if (theObj.display == 'none') show(obj); else hide(obj); } }                        ):   B                                                           3  A'     !     +        '     "     )