Last active
August 29, 2015 14:00
-
-
Save hemache/11299520 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <html> | |
| <head></head> | |
| <body> | |
| <table border="1"> | |
| <tr> | |
| <th>Colonne date</th> | |
| <th>Autre colonne</th> | |
| </tr> | |
| <tr> | |
| <td><span class="date"></span></td> | |
| <td>bla bla bla bla</td> | |
| </tr> | |
| <tr> | |
| <td><span class="date"></span></td> | |
| <td>blo blo blo blo</td> | |
| </tr> | |
| <tr> | |
| <td><span class="date"></span></td> | |
| <td>bli bli bli bli</td> | |
| </tr> | |
| </table> | |
| <script> | |
| (function(){ | |
| var colonnesDate = document.getElementsByClassName("date"), | |
| date = new Date(), | |
| dateAujourdhui = date.toDateString(); // http://www.w3schools.com/jsref/jsref_obj_date.asp | |
| for(var x=0; x <= colonnesDate.length; x++) | |
| { | |
| colonnesDate[x].innerText = dateAujourdhui; | |
| } | |
| })(); | |
| </script> | |
| </body> | |
| </html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment