12_DOM_Partie_1 - CSI 3540 Structures, techniques et normes...

Info iconThis preview shows pages 1–15. Sign up to view the full content.

View Full Document Right Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: CSI 3540 Structures, techniques et normes du Web Friday, February 26, 2010 Objectif: • Bien comprendre le modèle objet de document (DOM HTML) ; l’API permettant à JavaScript (et aux autres langages) de manipuler la page courante de l’agent utilisateur Lectures: • Web Technologies (2007) § 5 pages 249–268 JavaScript, documents XHTML, CSS 2 et DOM Friday, February 26, 2010 Plan 1. Motivation 2. Événements intrinsèques de XHTML 3. DOM 2 Core 4. DOM 2 HTML Friday, February 26, 2010 Friday, February 26, 2010 IE6 n’est plus • Le gouvernement de la Grande- Bretagne ne supportera plus IE6 • Google (Youtube, GoogleDocs, GMail, Google Calendar) cesse le support pour IE6 • Pour Youtube , le 13 mars marque le début de la fn de IE6 Friday, February 26, 2010 Qu’est-ce que c’est? • Laissons parler les auteurs de la spécifcation : • “(...) une interface indépendante de la plateforme et du langage qui permet aux programmes et aux scripts l' accès et la mise à jour dynamique du contenu et de la structure des documents .” Friday, February 26, 2010 Motivation Friday, February 26, 2010 Friday, February 26, 2010 Friday, February 26, 2010 <! DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd " > < html xmlns = "http://www.w3.org/1999/xhtml " lang = "fr-CA" > < head > < title >Smiley</ title > < meta http-equiv = "Content-Type" content = "text/html; charset=UTF-8" /> < meta http-equiv = "Content-Script-Type" content = "text/javascript" /> < link rel = "stylesheet" type = "text/css" href = "default.css" media = "all" /> < script type = "text/javascript" src = "Script.js" > </ script > </ head > < body > < div style = "text-align:center" > < img id = "smiley" src = "smiley-01.png" alt = "Smiley" width = "580" height = "580" onmouseover = "swap( 'smiley', 'smiley-02.png' );" onmouseout = "swap( 'smiley', 'smiley-01.png' );" /> </ div > </ body > </ html > Friday, February 26, 2010 function swap( id, URL ) { var elt = window.document.getElementById( id ) elt.setAttribute( "src", URL ); } Friday, February 26, 2010 getElementById( id ) ... document setAttribute( nom, valeur ) ... id src ... Element * 1 < html > ... < img id = "smiley" src = "smiley-01.png" ... /> ... </ html > Friday, February 26, 2010 Content-Script-Type • L’attribut HTTP-EQUIV de la balise META sert à construire un en-tête équivalent aux en-têtes du message HTTP réponse <! DOCTYPE html ... < html ... > < head > ... < meta http-equiv = "Content-Type" content = "text/html; charset=UTF-8" /> < meta http-equiv = "Content-Script-Type" content = "text/javascript" /> ... </ head > < body > ... </ body > </ html > Le langage par défaut est JavaScript Friday, February 26, 2010 > telnet www.site.uottawa.ca 80 Trying 137 .122.89.222......
View Full Document

This note was uploaded on 06/07/2010 for the course CSI ITI1520 taught by Professor Marcelturcotte during the Spring '10 term at University of Ottawa.

Page1 / 64

12_DOM_Partie_1 - CSI 3540 Structures, techniques et normes...

This preview shows document pages 1 - 15. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online