123456789101112131415161718192021222324252627282930313233343536373839404142 |
- function capitalize( str ) {
- return str.charAt(0).toUpperCase() + str.slice(1);
- }
-
- function toHeader(array){
- let resultat = document.createElement("tr");
-
- for(let i = 0; i < array.length ; i++ ){
- let cell = document.createElement("th");
- cell.innerText = array[i];
- resultat.appendChild( cell );
- }
- return resultat;
- }
-
- function characterToLine(){
- let line = document.CreateElement('td');
- let cell = document.CreateElement('tr');
- }
-
- function display(html_id, data){
- let anchor = document.getElementById( html_id ) ;
- let resultat = document.createElement( "table" );
-
- let header = toHeader( Object.keys(data) );
-
- for(let i = 0 ; i < data.length ; i++){
- }
- html_id.appendChild( resultat );
- }
-
- function setElementValue( elem, value ){
- elem.style.transitionDuration = "0s";
- elem.style.backgroundColor = "red";
- elem.style.color = "white";
- elem.value = value ;
- window.setTimeout(() => {
- elem.style.transitionDuration = "7s";
- elem.style.backgroundColor = "inherit";
- elem.style.color = "inherit";
- }, 1000);
- }
|