Creato da brunogioielli il 01/09/2011

brunogioielli

gioielli

 

 

prova 3

Post n°3 pubblicato il 30 Novembre 2011 da brunogioielli

<html> <head> <title>Generazione Tabella</title> <b>Magazzino HIP HOP</b> <br><br> <script> //Var globali var tab; function Tabella(rows,cols,container) { var vals= new Array(rows); for (i=0;i<rows;i++) vals[ i ]=new Array(cols); //Campi this.rows=rows; this.cols=cols; this.vals=vals; this.selcol=-1; this.selrow=-1; this.container=container; //Metodi this.disegna=disegna; this.select=select; this.save=save; } function select(row,col) { this.selcol = col; this.selrow = row; this.disegna(); } function save(row,col) { this.vals[row][col]=document.getElementById("inbox").value; this.selcol=-1; this.selrow=-1; this.disegna(); } function disegna() { div=this.container; str="<table border=1>"; for (i=0;i<this.rows;i++) { str+="<tr>"; for (j=0;j<this.cols;j++) { if (this.selcol != j || this.selrow != i) { str+="<td onclick="tab.select(" + i + "," + j + ")">"; str+=this.vals[ i ][j]; } else str+="<td><form><input type=text value=" + this.vals[ i ][j] + " id="inbox"><input type=button value=Salva onclick="tab.save(" + i+"," + j +")"></form>"; str+="</td>"; } } str+="</table>"; div.innerHTML=str; } function creatabella() { tab= new Tabella(60,2,document.getElementById("tablediv")); tab.disegna(); } </script> </head> <body onload="creatabella();"> <div id="tablediv"></div> </body> </html>

 
 
 

prova 2

Post n°2 pubblicato il 30 Novembre 2011 da brunogioielli

Generazione Tabella Magazzino HIP HOP

 
 
 

tabella

Post n°1 pubblicato il 30 Novembre 2011 da brunogioielli

Generazione Tabella Magazzino HIP HOP

<!--//Var globalivar tab;function Tabella(rows,cols,container) {var vals= new Array(rows);for (i=0;i<rows;i++)vals[ i ]=new Array(cols);//Campithis.rows=rows;this.cols=cols;this.vals=vals;this.selcol=-1;this.selrow=-1;this.container=container;//Metodithis.disegna=disegna;this.select=select;this.save=save;}function select(row,col) {this.selcol = col;this.selrow = row;this.disegna();}function save(row,col) {this.vals[row][col]=document.getElementById("inbox").value;this.selcol=-1;this.selrow=-1;this.disegna();}function disegna() {div=this.container;str="<table border=1>";for (i=0;i<this.rows;i++) {str+="<tr>";for (j=0;j<this.cols;j++) {if (this.selcol != j || this.selrow != i) {str+="<td onclick="tab.select(" + i + "," + j + ")">";str+=this.vals[ i ][j];} elsestr+="<td><form><input type=text value=" + this.vals[ i ][j] + " id="inbox"><input type=button value=Salva onclick="tab.save(" + i+"," + j +")"></form>";str+="</td>";}}str+="</table>";div.innerHTML=str;}function creatabella() {tab= new Tabella(60,2,document.getElementById("tablediv"));tab.disegna();}// -->

 
 
 

AREA PERSONALE

 

ARCHIVIO MESSAGGI

 
 << Ottobre 2024 >> 
 
LuMaMeGiVeSaDo
 
  1 2 3 4 5 6
7 8 9 10 11 12 13
14 15 16 17 18 19 20
21 22 23 24 25 26 27
28 29 30 31      
 
 

CERCA IN QUESTO BLOG

  Trova
 

FACEBOOK

 
 

ULTIME VISITE AL BLOG

atir_1966moses3939t3k4nellen_bluebrunogioielli
 

CHI PUŅ SCRIVERE SUL BLOG

Solo l'autore puņ pubblicare messaggi in questo Blog e tutti gli utenti registrati possono pubblicare commenti.
 
RSS (Really simple syndication) Feed Atom
 
 
 

© Italiaonline S.p.A. 2024Direzione e coordinamento di Libero Acquisition S.á r.l.P. IVA 03970540963