begin process at 2012 02 12 16:00:58
  Trouver un code source :
 
dans
 

3 commentaire(s) de LogansRun sur des sources sur tout CodeS-SourceS

Déposé sur Tableau html dynamique avec javascript dom



<html>

<head>

<style>



div#lecture {        
border-style : solid;
       border-width : 2px;
       border-color : #000000;
       width : 100px;
       height :auto;
text-align : center;
}

</style>

</head>

<body>

<div align='center'>
     <div id="lecture"></div>
</div>

</body>


<script language='javascript'>

function tab(col,lign,mep)
{
  this.tab = document.createElement("table");
  this.tab.setAttribute("align",mep);
  this.autoid=1;
  this.lign = lign;

for(j=0;j<lign;j++)
{
   this.newRow = this.tab.insertRow(-1);
   for(i=0;i<col;i++)
   {
    
     this.newCell = this.newRow.insertCell(i);
     this.newCell.innerHTML = this.autoid;
     this.newCell.setAttribute("id",this.autoid);


/* ############################# fonction de la cellule ################################### */

     this.newCell.onclick = function () { window.alert(this.id);  }
     this.newCell.onmouseover = function () {  this.style.backgroundColor = "#FFF000";  document.getElementById("lecture").innerHTML = " "+ parseFloat(this.innerHTML*6.55957).toFixed(2)+" Francs "; }
     this.newCell.onmouseout = function () {  this.style.backgroundColor = "#FFF";  }

    

    
/* ############################# style de l'objet ################################### */

     with(this.newCell.style)
     {
       borderStyle = 'solid';
       borderWidth = '2px';
       borderColor = "#000000";
       width = '100px';
       height = '50px';
       textAlign = 'center';
     }
   this.autoid++;
  }
}

/* ############################# fonction de l'objet ################################### */

  this.addtxt = function(id)
  {
    document.getElementById(id).innerHTML = "ne";
  }



  document.body.appendChild(this.tab);
    
}

var tab = new tab(10,10,"center");

</script>

</html>

produit customisé et dérivé pour ma grand-mère ...
Posté le : 26/06/2009 03:12:23

Déposé sur Tableau html dynamique avec javascript dom

<html>

<head>



</head>

<body>

</body>


<script language='javascript'>

function tab(col,lign,mep)
{
  this.tab = document.createElement("table");
  this.tab.setAttribute("align",mep);
  this.autoid=1;

for(j=0;j<lign;j++)
{
   this.newRow = this.tab.insertRow(-1);
   for(i=0;i<col;i++)
   {
    
     this.newCell = this.newRow.insertCell(i);
     this.newCell.innerHTML = /* "&nbsp;"; */ this.autoid;
     this.newCell.setAttribute("id",this.autoid);
     this.newCell.onclick = function () { window.alert(this.id);  }

     with(this.newCell.style)
     {
       borderStyle = 'solid';
       borderWidth = '2px';
       borderColor = "#000000";
       width = '100px';
       height = '50px';
       textAlign = 'center';
     }
   this.autoid++;
  }
}

  this.addtxt = function(id)
  {
    document.getElementById(id).innerHTML = "ne";
  }



  document.body.appendChild(this.tab);
    
}

var tab = new tab(10,10,"center");

</script>

</html>


fonctionne sous firefox et sur IE
Posté le : 26/06/2009 00:59:14

Déposé sur Keycode : quelle touche à été pressée ?

function process_keypress() {
// si nous avons un évênement clavier
if (window.event.type == "keypress" & window.event.keyCode > 0) {
alert(String.fromCharCode(window.event.keyCode)); // sous forme compréhensible
}
return true;
}

document.onkeypress = process_keypress;

au cas où ça intéresserait quelqu'un
Posté le : 17/11/2007 06:33:13

1


Nos sponsors


Sondage...

Comparez les prix

CalendriCode

Février 2012
LMMJVSD
  12345
6789101112
13141516171819
20212223242526
272829    

Consulter la suite du CalendriCode

Photothèque

 
Développement réalisé par Nicolas SOREL (Nix) avec l'aide de : Cyril DURAND et Emmanuel (EBArtSoft), Merci à Vincent pour ses précieux conseils.
CodeS-SourceS.com© Toute reproduction même partielle est interdite sauf accord écrit du Webmaster
CodeS-SourceS.com© est une marque déposée tous droits réservés

Google Coop CodeS-SourceS Google Coop CodeS-SourceS
Temps d'éxécution de la page : 0,733 sec (4)

Nous contacter | Annoncer sur CodeS-SourceS | Mentions légales