Ci-dessous, les différences entre deux révisions de la page.
| Prochaine révision | Révision précédente | ||
| 56-tools:web [2016/12/14 17:18] – créée Roge | 56-tools:web [2017/10/30 11:12] (Version actuelle) – [Divers] Roge | ||
|---|---|---|---|
| Ligne 10: | Ligne 10: | ||
| http:// | http:// | ||
| + | ===== URL checker ===== | ||
| + | |||
| + | |||
| + | http:// | ||
| + | http:// | ||
| + | |||
| + | ===== Divers ===== | ||
| + | |||
| + | [[http:// | ||
| + | |||
| + | |||
| + | [[https:// | ||
| ===== REST ===== | ===== REST ===== | ||
| Ligne 38: | Ligne 50: | ||
| Certains proposent de passer par du XMLHTTPRequest pour utiliser d' | Certains proposent de passer par du XMLHTTPRequest pour utiliser d' | ||
| </ | </ | ||
| - | |||
| - | ===== URL checker ===== | ||
| - | |||
| - | |||
| - | http:// | ||
| - | |||
| - | http:// | ||
| - | |||
| - | |||
| - | ===== Tests scripts web: fiddle ===== | ||
| - | |||
| - | [[http:// | ||
| - | |||
| - | [[http:// | ||
| - | |||
| - | [[http:// | ||
| - | |||
| - | [[http:// | ||
| - | |||
| - | [[http:// | ||
| - | |||
| - | [[http:// | ||
| - | |||
| - | [[http:// | ||
| - | |||
| - | [[http:// | ||
| - | |||
| - | [[http:// | ||
| - | |||
| - | [[http:// | ||
| - | |||
| - | [[http:// | ||
| - | |||
| - | [[http:// | ||
| - | |||
| - | |||
| - | ===== Scritps ===== | ||
| - | |||
| - | Pour afficher le code source d'une page web, tapez le code | ||
| - | ci-dessous dans la barre d' | ||
| - | |||
| - | '' | ||
| - | |||
| - | <note important> | ||
| - | Attention: lors de la copie de ce code, souvent le navigateur | ||
| - | enlève le " | ||
| - | </ | ||
| - | ==== Parcourir le DOM ==== | ||
| - | |||
| - | <code javascript> | ||
| - | function walkTheDOM(node, | ||
| - | func(node); | ||
| - | node = node.firstChild; | ||
| - | while (node) { | ||
| - | walkTheDOM(node, | ||
| - | node = node.nextSibling; | ||
| - | } | ||
| - | | ||
| - | } | ||
| - | |||
| - | // Example usage: Process all Text nodes on the page | ||
| - | walkTheDOM(document.body, | ||
| - | console.log (" | ||
| - | }); | ||
| - | </ | ||
| - | |||
| - | ==== Image encodée en CSS ==== | ||
| - | Il très performant d' | ||
| - | |||
| - | <code javascript> | ||
| - | < | ||
| - | .ImgCollapsed { | ||
| - | cursor: pointer; | ||
| - | width:20; height:20; | ||
| - | text-decoration: | ||
| - | content: url(" | ||
| - | } | ||
| - | </ | ||
| - | |||
| - | <img class=" | ||
| - | </ | ||
| - | |||
| - | ==== Créer un tableau en Javascript ==== | ||
| - | |||
| - | <code javascript> | ||
| - | var table = document.createElement(' | ||
| - | var row = table.insertRow(); | ||
| - | row.insertCell().appendChild(document.createTextNode(nbModules)); | ||
| - | row.insertCell().appendChild(document.createTextNode(nbSequences)); | ||
| - | row.insertCell().appendChild(document.createTextNode(nbSeances)); | ||
| - | var header = table.createTHead().insertRow(); | ||
| - | header.insertCell().appendChild(document.createTextNode(" | ||
| - | header.insertCell().appendChild(document.createTextNode(" | ||
| - | header.insertCell().appendChild(document.createTextNode(" | ||
| - | // Add the table to the containing element. | ||
| - | document.getElementById(elt).appendChild(table); | ||
| - | </ | ||