bonjour,
est il possible de faire des colspan en fonction du nombre de cellules du tableau cliquées?
pour le moment j'arriver a cliquer les cellules mais au lieu de les avoir en lignes elles sont en colonnes.ce qui me permettrait par la suite de pouvoir remplir ma cellule redimensionnée.
merci
Code : Sélectionner tout - Visualiser dans une fenêtre à part
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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66 <table border="1" width="1600" cellspacing="1" cellpadding="30"> <?php $NbrLigne = 7; ?> <tr> <td style="background:#CCCCCC;">Salles</td> <td Lundi ><?php echo $debut_fin_semaine[0]; ?></td> <td Mardi><?php echo $debut_fin_semaine[1]; ?></td> <td Mercredi><?php echo $debut_fin_semaine[2]; ?></td> <td Jeudi><?php echo $debut_fin_semaine[3]; ?></td> <td Vendredi><?php echo $debut_fin_semaine[4]; ?></td> <td Samedi><?php echo $debut_fin_semaine[5]; ?></td> <td Dimanche><?php echo $debut_fin_semaine[6]; ?></td> </tr> <?php for ($i=1; $i<=$NbrLigne; $i++) { ?> <tr> <td> <?php //} // ------------------------- // DONNEES A AFFICHER dans la cellule if ($i==1){ echo " S1 "; } if ($i==2){ echo " S2 "; } if ($i==3){ echo "S3 "; } if ($i==4){ echo "S4 "; } if ($i==5){ echo " S5 "; } if ($i==6){ echo " S6 "; } if ($i==7){ echo "S7"; } ?> </td> <td></td> <td onclick="alert('ok');"> </td> <td onclick="alert('ok2');"> </td> <td></td> <td></td> <td></td> <td></td> </tr> <?php } ?> </table>
Partager