Dynamiser ses pages Web avec JavaScript
Adresses derrière les liens
Références pour le JavaScript
Écran 2
Eloquent JavaScript: A Modern Introduction to Programming
https://www.amazon.com/gp/product/1593275846/
JavaScript: the Definitive Guide
http://shop.oreilly.com/product/9780596805531.do
JavaScript: The Good Parts
http://shop.oreilly.com/product/9780596517748.do
You Don't Know JS: Scope & Closures
http://shop.oreilly.com/product/0636920026327.do
Code Conventions for the JavaScript Programming Language
http://crockford.com/javascript/code.html
JavaScript The Right Way
http://jstherightway.org/
JavaScript Standard Style
https://standardjs.com/
ECMAScript: A general purpose, cross-platform programming language
http://www.ecma-international.org/publications/standards/Ecma-262.htm
Guide JavaScript
https://developer.mozilla.org/fr/docs/Web/JavaScript/Guide
Référence JavaScript
https://developer.mozilla.org/fr/docs/Web/JavaScript/Reference
Référence du DOM
https://developer.mozilla.org/fr/docs/Web/API/Document_Object_Model
www.espacecourbeformation.com/fr/cours/apprendre-javascript/
http://www.espacecourbeformation.com/fr/cours/apprendre-javascript/
Historique du JavaScript
Écran 3
Babel
https://babeljs.io/
JavaScript sur Wikipedia
https://en.wikipedia.org/wiki/JavaScript
ECMAScript sur Wikipedia
https://en.wikipedia.org/wiki/ECMAScript
liste de moteurs ECMAScript
https://en.wikipedia.org/wiki/List_of_ECMAScript_engines
JavaScript comme langage universel
Écran 4
CommonJS
http://www.commonjs.org/
node.js
http://www.nodejs.org/
langages ou dialectes qui peuvent être compilés en JavaScript
https://github.com/jashkenas/coffeescript/wiki/list-of-languages-that-compile-to-js
Commentaires
Écran 8
commentaires
https://developer.mozilla.org/fr/docs/Web/JavaScript/Reference/Grammaire_lexicale#Commentaires
Identifiants, mots clés et détails syntaxiques
Écran 10
mot réservé
https://developer.mozilla.org/fr/docs/Web/JavaScript/Reference/Grammaire_lexicale#Mots-cl%C3%A9s
Section 7.6
http://www.ecma-international.org/publications/files/ECMA-ST/Ecma-262.pdf
mots résevés
https://developer.mozilla.org/fr/docs/Web/JavaScript/Reference/Grammaire_lexicale#Mots-cl%C3%A9s
comprendre les enjeux et le moment où ils sont vraiment critiques
http://blog.namangoel.com/considering-the-npm-styleguide
règle ASI pour Automatic Semicolon Insertion dans le standard ES5
http://es5.github.io/#x7.9
https://fr.wikipedia.org/wiki/Syntaxe_JavaScript
https://fr.wikipedia.org/wiki/Syntaxe_JavaScript
invoquer le mode strict
https://developer.mozilla.org/fr/docs/Web/JavaScript/Reference/Strict_mode
Types de données et définition de variables
Écran 11
littéraux
https://developer.mozilla.org/fr/docs/Web/JavaScript/Guide/Types_et_grammaire#Litt%C3%A9raux
variables
https://developer.mozilla.org/fr/docs/Web/JavaScript/Guide/Types_et_grammaire#Variables
enoncé var
https://developer.mozilla.org/fr/docs/Web/JavaScript/Reference/Instructions/var
type de données
https://developer.mozilla.org/fr/docs/Web/JavaScript/Structures_de_donn%C3%A9es
Notes sur les types et les variables
Écran 12
var ne permet pas des portées de blocs
https://developer.mozilla.org/fr/docs/Web/JavaScript/Reference/Instructions/bloc
let et const depuis ECMAScript 6 le permettent
https://developer.mozilla.org/fr/docs/Web/JavaScript/Reference/Instructions/let
In ECMAScript5, what's the scope of "use strict"?
https://stackoverflow.com/questions/2343608/in-ecmascript5-whats-the-scope-of-use-strict#3889829
Types de données : nombres
Écran 14
nouvelles représentations pour l'octal et le binaire
http://es6-features.org/#BinaryOctalLiteral
Types de données : chaînes de caractères
Écran 15
chaînes de caractères avec interpolation
http://es6-features.org/#StringInterpolation
Opérateurs
Écran 17
opérateurs
https://developer.mozilla.org/fr/docs/Web/JavaScript/Reference/Op%C3%A9rateurs
Précédence des opérateurs
Écran 18
tableau des précédences
https://developer.mozilla.org/fr/docs/Web/JavaScript/Reference/Op%C3%A9rateurs/Pr%C3%A9c%C3%A9dence_des_op%C3%A9rateurs
Méthode pour convertir convertir en nombre
Écran 20
parseInt()
https://developer.mozilla.org/fr/docs/Web/JavaScript/Reference/Objets_globaux/parseInt
parseFloat()
https://developer.mozilla.org/fr/docs/Web/JavaScript/Reference/Objets_globaux/parseFloat
isNaN()
https://developer.mozilla.org/fr/docs/Web/JavaScript/Reference/Objets_globaux/isNaN
Contrôle du flot : conditions
Écran 21
if..then..else
https://developer.mozilla.org/fr/docs/Web/JavaScript/Reference/Instructions/if...else
Contrôle du flot : switch
Écran 22
switch...case
https://developer.mozilla.org/fr/docs/Web/JavaScript/Reference/Instructions/switch
Contrôle du flot : boucles standard
Écran 23
boucle while
https://developer.mozilla.org/fr/docs/Web/JavaScript/Reference/Instructions/while
boucle do...while
https://developer.mozilla.org/fr/docs/Web/JavaScript/Reference/Instructions/do...while
boucle for
https://developer.mozilla.org/fr/docs/Web/JavaScript/Reference/Instructions/for
Contrôle du flot : itérer dans un objet
Écran 26
boucle for..in
https://developer.mozilla.org/fr/docs/Web/JavaScript/Reference/Instructions/for...in
boucle for..of
https://developer.mozilla.org/fr/docs/Web/JavaScript/Reference/Instructions/for...of
Fonctions (p. 1 / 2)
Écran 27
fonctions
https://developer.mozilla.org/fr/docs/Web/JavaScript/Reference/Fonctions
Fonctions (p. 2 / 2)
Écran 28
fonctions imbriquées
https://developer.mozilla.org/fr/docs/Web/JavaScript/Reference/Fonctions#Fonctions_imbriqu%C3%A9es_et_fermetures
Fonctions anonymes
Écran 29
créer une fonction avec l'objet Function
https://developer.mozilla.org/fr/docs/Web/JavaScript/Reference/Objets_globaux/Function
Fonctions avec un nombre d'arguments variable
Écran 30
arguments
https://developer.mozilla.org/fr/docs/Web/JavaScript/Reference/Fonctions/arguments
Portée des variables
Écran 32
Closures
https://developer.mozilla.org/fr/docs/Web/JavaScript/Closures
Méthodes pour créer un objet
Écran 36
Object.create()
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/create
notion de "classe"
https://developer.mozilla.org/fr/docs/Web/JavaScript/Reference/Classes
3 ways to define a JavaScript object
http://www.phpied.com/3-ways-to-define-a-javascript-class/
Initialisateur d'objets
https://developer.mozilla.org/fr/docs/Web/JavaScript/Reference/Op%C3%A9rateurs/Initialisateur_objet
There is no right way!
https://youtu.be/GhbhD1HR5vk?list=PL0zVEGEvSaeHBZFy6Q8731rcwk0Gtuxub&t=94
Quelques détails sur les propriétés d'un objet
Écran 41
delete
https://developer.mozilla.org/fr/docs/Web/JavaScript/Reference/Op%C3%A9rateurs/L_op%C3%A9rateur_delete
Créer une méthode
Écran 43
Methods Within Constructor vs Prototype in Javascript
https://www.thecodeship.com/web-development/methods-within-constructor-vs-prototype-in-javascript/
Un mot sur les prototypes
Écran 47
JavaScript avancé
http://www.espacecourbeformation.com/fr/cours/javascript-avance/
Objet Number
Écran 49
Number
https://developer.mozilla.org/fr/docs/Web/JavaScript/Reference/Objets_globaux/Number
Intl.NumberFormat()
https://developer.mozilla.org/fr/docs/Web/JavaScript/Reference/Objets_globaux/NumberFormat
Afficher les nombres à une précision donnée + traiter erreur
Écran 50
https://bugzilla.mozilla.org/show_bug.cgi?id=557530
https://bugzilla.mozilla.org/show_bug.cgi?id=557530
BigDecimal.js
https://github.com/iriscouch/bigdecimal.js
big.js
https://github.com/MikeMcl/big.js
JavaScript Decimal est en discussion dans ECMAScript
https://github.com/tc39/proposal-decimal
Objet Date
Écran 51
Date
https://developer.mozilla.org/fr/docs/Web/JavaScript/Reference/Objets_globaux/Date
Intl.DateTimeFormat()
https://developer.mozilla.org/fr/docs/Web/JavaScript/Reference/Objets_globaux/DateTimeFormat
Objet Array (séquentiel)
Écran 53
Array
https://developer.mozilla.org/fr/docs/Web/JavaScript/Reference/Objets_globaux/Array
Quelques fonctions accesseurs d'un tableau (p. 2/2)
Écran 56
méthodes d'accession
https://developer.mozilla.org/fr/docs/Web/JavaScript/Reference/Objets_globaux/Array#Les_accesseurs
méthodes d'itération
https://developer.mozilla.org/fr/docs/Web/JavaScript/Reference/Objets_globaux/Array#Les_m.C3.A9thodes_d%27it.C3.A9ration
Objet String
Écran 60
String
https://developer.mozilla.org/fr/docs/Web/JavaScript/Reference/Objets_globaux/String
Objet Math
Écran 61
Math
https://developer.mozilla.org/fr/docs/Web/JavaScript/Reference/Objets_globaux/Math
Traitement des erreurs
Écran 62
types d'erreurs reconnus d'emblée
https://developer.mozilla.org/fr/docs/Web/JavaScript/Reference/Objets_globaux/Error
try...catch
https://developer.mozilla.org/fr/docs/Web/JavaScript/Reference/Instructions/try...catch
Lancer une exception
Écran 63
objet Error
https://developer.mozilla.org/fr/docs/Web/JavaScript/Reference/Objets_globaux/Error
throw
https://developer.mozilla.org/fr/docs/Web/JavaScript/Guide/Contr%C3%B4le_du_flux_Gestion_des_erreurs#L%27instruction_throw
Formulaires et le DOM
Écran 67
DOM HTML Niveau 1
https://developer.mozilla.org/en-US/docs/Web/API/HTML_DOM_API
avec certains risques
https://developer.mozilla.org/en-US/docs/Web/API/HTMLFormElement#issues_with_naming_elements
Interface pour les formulaires
Écran 68
DOM HTMLFormElement
https://developer.mozilla.org/fr/docs/Web/API/HTMLFormElement
Interface pour les champs input
Écran 69
DOM HTMLInputElement (en anglais)
https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement
Introduction
Écran 72
http://www.w3.org/DOM/
http://www.w3.org/DOM/
Différentes versions du DOM
Écran 73
plusieurs versions officielles du DOM
https://www.w3.org/DOM/DOMTR
Types de nœuds
Écran 78
nodeType
https://developer.mozilla.org/fr/docs/Web/API/Node/nodeType
documentation en anglais
https://developer.mozilla.org/en-US/docs/Web/API/Node/nodeType
Attention aux espaces de toutes sortes!
Écran 79
gestion des espaces sur MDN
https://developer.mozilla.org/fr/docs/Gestion_des_espaces_dans_le_DOM
Interfaces du DOM niveau 1
Écran 80
diagramme de classes du DOM niveau 1
http://www.xml.com/pub/1999/07/dom/
IDL DOM niveau 2 au W3C
https://www.w3.org/TR/2000/REC-DOM-Level-2-Core-20001113/idl-definitions.html
Interface DOM Document
Écran 81
DOM document
https://developer.mozilla.org/fr/docs/Web/API/document
Méthode getElementById
Écran 82
DOM HTML niveau 1
https://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/idl-definitions.html
getElementById
https://developer.mozilla.org/fr/docs/Web/API/document.getElementById
Méthodes createElement et createTextNode
Écran 83
createTextNode
https://developer.mozilla.org/fr/docs/Web/API/document.createTextNode
createElement
https://developer.mozilla.org/fr/docs/Web/API/document.createElement
Méthodes createElement et createTextNode (suite)
Écran 85
DOM HTML
http://www.w3.org/TR/REC-DOM-Level-1/level-one-html.html
DOM Parsing and Serialization
https://w3c.github.io/DOM-Parsing/#the-innerhtml-mixin
propriété innerHTML
https://developer.mozilla.org/fr/docs/Web/API/Element/innertHTML
Interface DOM Node
Écran 86
DOM Node
https://developer.mozilla.org/fr/docs/Web/API/Node
Attributs nodeType, nodeValue et nodeName
Écran 88
ajouter ces constantes manuellement
http://stackoverflow.com/questions/1444650/how-does-one-access-the-node-type-constants-in-ie
Méthodes appendChild et insertBefore
Écran 90
appendChild
https://developer.mozilla.org/fr/docs/Web/API/Element.appendChild
insertBefore
https://developer.mozilla.org/fr/docs/Web/API/Element.insertBefore
Méthodes hasChildNodes, removeChild et replaceChild
Écran 91
hasChildNodes
https://developer.mozilla.org/fr/docs/Web/API/Element.hasChildNodes
removeChild
https://developer.mozilla.org/fr/docs/Web/API/Element.removeChild
Interface DOM Element
Écran 92
DOM element
https://developer.mozilla.org/fr/docs/Web/API/element
Méthode getElementsByTagName
Écran 93
getElementsByTagName
https://developer.mozilla.org/fr/docs/Web/API/Element.getElementsByTagName
DOM HTML et DOM HTML5
Écran 94
DOM HTML Niveau 1
https://developer.mozilla.org/en-US/docs/Web/API/HTML_DOM_API
DOM HTML5
https://dom.spec.whatwg.org/
Organisation partielle de DOM HTML
Écran 95
HTMLInputElement
https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement
Propriétés de l'interface HTMLElement
Écran 97
liste complète des interfaces DOM HTML
https://developer.mozilla.org/fr/docs/Web/API/Document_Object_Model#Interfaces_des_%C3%A9l%C3%A9ments_HTML
Quelques commentaires sur d'autres interfaces
Écran 98
HTMLAnchorElement
https://developer.mozilla.org/en-US/docs/Web/API/HTMLAnchorElement
HTMLImageElement
https://developer.mozilla.org/fr/docs/Web/API/HTMLImageElement
HTMLSelectElement
https://developer.mozilla.org/en-US/docs/Web/API/HTMLSelectElement
DOM HTML5
Écran 99
DOM Niveau 4
https://www.w3.org/TR/domcore/
Modifier le style d'un élément
Écran 101
http://www.w3.org/TR/DOM-Level-2-Style/css.html#CSS-CSS2Properties
http://www.w3.org/TR/DOM-Level-2-Style/css.html#CSS-CSS2Properties
style
https://developer.mozilla.org/fr/docs/Web/API/Element.style
Événement, plusieurs fonctions avec le DOM
Écran 103
http://www.w3.org/TR/2000/REC-DOM-Level-2-Events-20001113/
http://www.w3.org/TR/2000/REC-DOM-Level-2-Events-20001113/
Objet Event
Écran 104
ordre de traitement des événements lors de collision de gestionnaires
http://www.quirksmode.org/js/events_order.html
Phase de capture et phase de bouillonnement
Écran 105
tutoriel pour comprendre les phases de capture (capturing) et de bouillonnement (bubbling)
http://javascript.info/tutorial/bubbling-and-capturing
Exercice des taxes : empêcher que la touche 'Entrée' soumette le formulaire
Écran 108
http://stackoverflow.com/questions/585396/how-to-prevent-enter-keypress-to-submit-a-web-form
http://stackoverflow.com/questions/585396/how-to-prevent-enter-keypress-to-submit-a-web-form
Librairies pour aider...
Écran 112
jQuery
http://jquery.com/
Prototype
http://www.prototypejs.org/
Script.aculo.us
http://script.aculo.us/
Yahoo! UI Library
http://developer.yahoo.com/yui/
Dojo Toolkit
http://dojotoolkit.org/
MooTools
http://mootools.net/
Chronomètre...
Écran 114
documentation setTimeout
https://developer.mozilla.org/fr/docs/Web/API/WindowTimers/setTimeout
Gestionnaires d'événements (p. 4/4)
Écran 119
liste complète des gestionnaires d'événements possibles
https://developer.mozilla.org/en-US/docs/Web/Events
Tous droits réservés 2021, Espace Courbe Formation inc. —2 mai 2021 — 20:42:01