Warning: simplexml_load_file() [function.simplexml-load-file]: http://www.morbleu.com/random-link.xml?ei=3%7C4%7C9%7C11%7C13%7C15%7C17%7C19%7C21%7C27%7C28%7C33%7C37%7C39%7C41%7C47%7C52%7C53%7C55%7C57%7C59%7C66%7C68%7C70%7C79%7C81%7C84%7C86%7C91%7C93%7C95%7C97%7C98%7C101%7C104%7C111%7C117%7C118%7C126%7C128%7C130%7C135%7C139%7C143%7C145%7C147%7C148%7C152%7C156%7C158%7C159%7C161%7C163%7C166%7C168%7C172%7C177%7C184%7C189%7C191%7C193%7C198%7C202%7C204%7C205%7C207%7C211%7C214%7C216%7C217%7C219%7C223%7C225%7C226%7C228%7C230%7C233%7C234%7C236%7C238%7C240%7C242%7C244%7C247%7C249%7C250%7C252%7C255%7C256%7C259%7C260%7C263%7C266%7C269%7C270%7C272%7C276%7C279%7C281%7C282%7C284%7C286%7C288%7C290%7C292%7C295%7C297%7C298%7C301%7C308%7C:6: parser error : Entity 'ldquo' not defined in /home.10.2/cybwarri/ixweb/include/libs/lib_random_link.php on line 77

Warning: simplexml_load_file() [function.simplexml-load-file]: <description>&ldquo; Sorte de jurement en usage m&ecirc;me parmi les gens de bo in /home.10.2/cybwarri/ixweb/include/libs/lib_random_link.php on line 77

Warning: simplexml_load_file() [function.simplexml-load-file]: ^ in /home.10.2/cybwarri/ixweb/include/libs/lib_random_link.php on line 77

Warning: simplexml_load_file() [function.simplexml-load-file]: http://www.morbleu.com/random-link.xml?ei=3%7C4%7C9%7C11%7C13%7C15%7C17%7C19%7C21%7C27%7C28%7C33%7C37%7C39%7C41%7C47%7C52%7C53%7C55%7C57%7C59%7C66%7C68%7C70%7C79%7C81%7C84%7C86%7C91%7C93%7C95%7C97%7C98%7C101%7C104%7C111%7C117%7C118%7C126%7C128%7C130%7C135%7C139%7C143%7C145%7C147%7C148%7C152%7C156%7C158%7C159%7C161%7C163%7C166%7C168%7C172%7C177%7C184%7C189%7C191%7C193%7C198%7C202%7C204%7C205%7C207%7C211%7C214%7C216%7C217%7C219%7C223%7C225%7C226%7C228%7C230%7C233%7C234%7C236%7C238%7C240%7C242%7C244%7C247%7C249%7C250%7C252%7C255%7C256%7C259%7C260%7C263%7C266%7C269%7C270%7C272%7C276%7C279%7C281%7C282%7C284%7C286%7C288%7C290%7C292%7C295%7C297%7C298%7C301%7C308%7C:6: parser error : Entity 'ecirc' not defined in /home.10.2/cybwarri/ixweb/include/libs/lib_random_link.php on line 77

Warning: simplexml_load_file() [function.simplexml-load-file]: <description>&ldquo; Sorte de jurement en usage m&ecirc;me parmi les gens de bo in /home.10.2/cybwarri/ixweb/include/libs/lib_random_link.php on line 77

Warning: simplexml_load_file() [function.simplexml-load-file]: ^ in /home.10.2/cybwarri/ixweb/include/libs/lib_random_link.php on line 77

Warning: simplexml_load_file() [function.simplexml-load-file]: http://www.morbleu.com/random-link.xml?ei=3%7C4%7C9%7C11%7C13%7C15%7C17%7C19%7C21%7C27%7C28%7C33%7C37%7C39%7C41%7C47%7C52%7C53%7C55%7C57%7C59%7C66%7C68%7C70%7C79%7C81%7C84%7C86%7C91%7C93%7C95%7C97%7C98%7C101%7C104%7C111%7C117%7C118%7C126%7C128%7C130%7C135%7C139%7C143%7C145%7C147%7C148%7C152%7C156%7C158%7C159%7C161%7C163%7C166%7C168%7C172%7C177%7C184%7C189%7C191%7C193%7C198%7C202%7C204%7C205%7C207%7C211%7C214%7C216%7C217%7C219%7C223%7C225%7C226%7C228%7C230%7C233%7C234%7C236%7C238%7C240%7C242%7C244%7C247%7C249%7C250%7C252%7C255%7C256%7C259%7C260%7C263%7C266%7C269%7C270%7C272%7C276%7C279%7C281%7C282%7C284%7C286%7C288%7C290%7C292%7C295%7C297%7C298%7C301%7C308%7C:6: parser error : Entity 'rdquo' not defined in /home.10.2/cybwarri/ixweb/include/libs/lib_random_link.php on line 77

Warning: simplexml_load_file() [function.simplexml-load-file]: &ldquo; Sorte de jurement en usage m&ecirc;me parmi les gens de bon ton. &rdquo; in /home.10.2/cybwarri/ixweb/include/libs/lib_random_link.php on line 77

Warning: simplexml_load_file() [function.simplexml-load-file]: ^ in /home.10.2/cybwarri/ixweb/include/libs/lib_random_link.php on line 77

Warning: simplexml_load_file() [function.simplexml-load-file]: http://www.morbleu.com/random-link.xml?ei=3%7C4%7C9%7C11%7C13%7C15%7C17%7C19%7C21%7C27%7C28%7C33%7C37%7C39%7C41%7C47%7C52%7C53%7C55%7C57%7C59%7C66%7C68%7C70%7C79%7C81%7C84%7C86%7C91%7C93%7C95%7C97%7C98%7C101%7C104%7C111%7C117%7C118%7C126%7C128%7C130%7C135%7C139%7C143%7C145%7C147%7C148%7C152%7C156%7C158%7C159%7C161%7C163%7C166%7C168%7C172%7C177%7C184%7C189%7C191%7C193%7C198%7C202%7C204%7C205%7C207%7C211%7C214%7C216%7C217%7C219%7C223%7C225%7C226%7C228%7C230%7C233%7C234%7C236%7C238%7C240%7C242%7C244%7C247%7C249%7C250%7C252%7C255%7C256%7C259%7C260%7C263%7C266%7C269%7C270%7C272%7C276%7C279%7C281%7C282%7C284%7C286%7C288%7C290%7C292%7C295%7C297%7C298%7C301%7C308%7C:6: parser error : Entity 'eacute' not defined in /home.10.2/cybwarri/ixweb/include/libs/lib_random_link.php on line 77

Warning: simplexml_load_file() [function.simplexml-load-file]: e jurement en usage m&ecirc;me parmi les gens de bon ton. &rdquo; (Littr&eacute; in /home.10.2/cybwarri/ixweb/include/libs/lib_random_link.php on line 77

Warning: simplexml_load_file() [function.simplexml-load-file]: ^ in /home.10.2/cybwarri/ixweb/include/libs/lib_random_link.php on line 77

Warning: simplexml_load_file() [function.simplexml-load-file]: http://www.morbleu.com/random-link.xml?ei=4%7C17%7C28%7C37%7C39%7C47%7C52%7C68%7C81%7C101%7C147%7C166%7C168%7C172%7C184%7C193%7C198%7C207%7C216%7C219%7C233%7C234%7C256%7C272%7C279%7C281%7C292%7C298%7C:6: parser error : Entity 'ldquo' not defined in /home.10.2/cybwarri/ixweb/include/libs/lib_random_link.php on line 77

Warning: simplexml_load_file() [function.simplexml-load-file]: <description>&ldquo; Sorte de jurement en usage m&ecirc;me parmi les gens de bo in /home.10.2/cybwarri/ixweb/include/libs/lib_random_link.php on line 77

Warning: simplexml_load_file() [function.simplexml-load-file]: ^ in /home.10.2/cybwarri/ixweb/include/libs/lib_random_link.php on line 77

Warning: simplexml_load_file() [function.simplexml-load-file]: http://www.morbleu.com/random-link.xml?ei=4%7C17%7C28%7C37%7C39%7C47%7C52%7C68%7C81%7C101%7C147%7C166%7C168%7C172%7C184%7C193%7C198%7C207%7C216%7C219%7C233%7C234%7C256%7C272%7C279%7C281%7C292%7C298%7C:6: parser error : Entity 'ecirc' not defined in /home.10.2/cybwarri/ixweb/include/libs/lib_random_link.php on line 77

Warning: simplexml_load_file() [function.simplexml-load-file]: <description>&ldquo; Sorte de jurement en usage m&ecirc;me parmi les gens de bo in /home.10.2/cybwarri/ixweb/include/libs/lib_random_link.php on line 77

Warning: simplexml_load_file() [function.simplexml-load-file]: ^ in /home.10.2/cybwarri/ixweb/include/libs/lib_random_link.php on line 77

Warning: simplexml_load_file() [function.simplexml-load-file]: http://www.morbleu.com/random-link.xml?ei=4%7C17%7C28%7C37%7C39%7C47%7C52%7C68%7C81%7C101%7C147%7C166%7C168%7C172%7C184%7C193%7C198%7C207%7C216%7C219%7C233%7C234%7C256%7C272%7C279%7C281%7C292%7C298%7C:6: parser error : Entity 'rdquo' not defined in /home.10.2/cybwarri/ixweb/include/libs/lib_random_link.php on line 77

Warning: simplexml_load_file() [function.simplexml-load-file]: &ldquo; Sorte de jurement en usage m&ecirc;me parmi les gens de bon ton. &rdquo; in /home.10.2/cybwarri/ixweb/include/libs/lib_random_link.php on line 77

Warning: simplexml_load_file() [function.simplexml-load-file]: ^ in /home.10.2/cybwarri/ixweb/include/libs/lib_random_link.php on line 77

Warning: simplexml_load_file() [function.simplexml-load-file]: http://www.morbleu.com/random-link.xml?ei=4%7C17%7C28%7C37%7C39%7C47%7C52%7C68%7C81%7C101%7C147%7C166%7C168%7C172%7C184%7C193%7C198%7C207%7C216%7C219%7C233%7C234%7C256%7C272%7C279%7C281%7C292%7C298%7C:6: parser error : Entity 'eacute' not defined in /home.10.2/cybwarri/ixweb/include/libs/lib_random_link.php on line 77

Warning: simplexml_load_file() [function.simplexml-load-file]: e jurement en usage m&ecirc;me parmi les gens de bon ton. &rdquo; (Littr&eacute; in /home.10.2/cybwarri/ixweb/include/libs/lib_random_link.php on line 77

Warning: simplexml_load_file() [function.simplexml-load-file]: ^ in /home.10.2/cybwarri/ixweb/include/libs/lib_random_link.php on line 77

Warning: simplexml_load_file() [function.simplexml-load-file]: http://www.morbleu.com/random-link.xml:6: parser error : Entity 'ldquo' not defined in /home.10.2/cybwarri/ixweb/include/libs/lib_random_link.php on line 77

Warning: simplexml_load_file() [function.simplexml-load-file]: <description>&ldquo; Sorte de jurement en usage m&ecirc;me parmi les gens de bo in /home.10.2/cybwarri/ixweb/include/libs/lib_random_link.php on line 77

Warning: simplexml_load_file() [function.simplexml-load-file]: ^ in /home.10.2/cybwarri/ixweb/include/libs/lib_random_link.php on line 77

Warning: simplexml_load_file() [function.simplexml-load-file]: http://www.morbleu.com/random-link.xml:6: parser error : Entity 'ecirc' not defined in /home.10.2/cybwarri/ixweb/include/libs/lib_random_link.php on line 77

Warning: simplexml_load_file() [function.simplexml-load-file]: <description>&ldquo; Sorte de jurement en usage m&ecirc;me parmi les gens de bo in /home.10.2/cybwarri/ixweb/include/libs/lib_random_link.php on line 77

Warning: simplexml_load_file() [function.simplexml-load-file]: ^ in /home.10.2/cybwarri/ixweb/include/libs/lib_random_link.php on line 77

Warning: simplexml_load_file() [function.simplexml-load-file]: http://www.morbleu.com/random-link.xml:6: parser error : Entity 'rdquo' not defined in /home.10.2/cybwarri/ixweb/include/libs/lib_random_link.php on line 77

Warning: simplexml_load_file() [function.simplexml-load-file]: &ldquo; Sorte de jurement en usage m&ecirc;me parmi les gens de bon ton. &rdquo; in /home.10.2/cybwarri/ixweb/include/libs/lib_random_link.php on line 77

Warning: simplexml_load_file() [function.simplexml-load-file]: ^ in /home.10.2/cybwarri/ixweb/include/libs/lib_random_link.php on line 77

Warning: simplexml_load_file() [function.simplexml-load-file]: http://www.morbleu.com/random-link.xml:6: parser error : Entity 'eacute' not defined in /home.10.2/cybwarri/ixweb/include/libs/lib_random_link.php on line 77

Warning: simplexml_load_file() [function.simplexml-load-file]: e jurement en usage m&ecirc;me parmi les gens de bon ton. &rdquo; (Littr&eacute; in /home.10.2/cybwarri/ixweb/include/libs/lib_random_link.php on line 77

Warning: simplexml_load_file() [function.simplexml-load-file]: ^ in /home.10.2/cybwarri/ixweb/include/libs/lib_random_link.php on line 77
JavaScript - L'objet navigator
  Accueil Accueil     Membres Membres     Forum Forum     Articles Articles     Download Download     Sondages Sondages     Outils Outils     Scriptland Scriptland     ProgBoards ProgBoards     FR  
  Morbleu ! Morbleu ! 
Cours de programmation, code source, aide au développement, forums d'entraide - CybWarrior

login Bug Contact RSS
login bug contact RSS


| Internet |
   Créer son site web

| Langages |
   HTML
   JavaScript
   Langage C
   PHP
   QBasic
   Turbo Pascal

| Programmation |
   Algorithmie
   Maths appliquées
   Windows

| Trucs & astuces |
   Lexique
   Oeufs de Pâques (easter eggs)
   Registre et Windows

| Téléchargements |
   Flash
   Freeware
   JavaScript
   NASM
   PHP
   QBasic
   Turbo Pascal
   Visual Basic / VBScript

JavaScript - L'objet navigator

Autre langage disponible pour cet article : FR
Rubrique : JavaScript
lundi 25 mars 2002 18:40

Voir les commentaires pour JavaScript - L'objet navigator
Autres articles :
- JavaScript - Introduction au JavaScript
- JavaScript - Inclusion dans une page
- JavaScript - Un langage orienté objet
- JavaScript - Les commentaires
- JavaScript - Ecrire dans le document
- JavaScript - Les variables
- JavaScript - Opérateurs
- JavaScript - La structure conditionnelle
- JavaScript - Les cas
- JavaScript - Les boucles
- JavaScript - Les tableaux
- JavaScript - Les fonctions
- JavaScript - Les objets
- JavaScript - L'objet String
- JavaScript - L'objet Number
- JavaScript - L'objet Math
- JavaScript - L'objet Date
- JavaScript - Les expressions régulières
- JavaScript - L'objet navigator
<< - >>

  1. Méthode
    1. javaEnabled()
  2. Propriétés
    1. appCodeName
    2. appName
    3. appVersion
    4. platform
    5. userAgent
On a vu que les navigateurs réagissent souvent différement les uns des autres lorsqu'il s'agit d'interpréter un script. Par exemple, certaines propriétés d'un objet existe sous Netscape Navigator, mais pas sous Mircosoft Internet Explorer, et vice-versa.
Il peut alors être utile d'avoir des informations supplémentaires sur le navigateur utilisé, afin d'adapter le script en conséquent.
JavaScript met à notre disposition l'objet navigator. Cet objet est en fait, un "sous-objet" de l'objet window. On peut donc y acceder de deux façons :
window.navigator

ou

navigator
Voici un exemple d'utilisation de cet objet :
with(document){
writeln("<pre>");
writeln("Navigateur   : " + navigator.appName);
writeln("+ Version    : " + navigator.appVersion);
writeln("+ Agent      : " + navigator.userAgent);
writeln("Système d'exploitation : " + navigator.platform);
if(navigator.javaEnabled())
writeln("Java est installé");
else
writeln("Java n'est pas installé");
writeln("</pre>");
}
Voici le résultat

Méthode

javaEnabled()
Renvoi true si Java est installé, false dans le cas contraire.

Propriétés

appCodeName
Renvoi le nom de code du navigateur.

appName
Renvoi le nom du navigateur.

appVersion
Renvoi la version du navigateur.

platform
Renvoi le système d'exploitation (la plateforme) de l'utilisateur.

userAgent
Renvoi le nom de code + la version du navigateur.



Voir les commentaires pour JavaScript - L'objet navigator
 06 juillet 2008 | Version 4.0.0 | © 2001 - 2007