IdentifiantMot de passe
Loading...
Mot de passe oublié ?Je m'inscris ! (gratuit)
Navigation

Inscrivez-vous gratuitement
pour pouvoir participer, suivre les réponses en temps réel, voter pour les messages, poser vos propres questions et recevoir la newsletter

HTML Discussion :

inclure un check box dans une table


Sujet :

HTML

  1. #1
    Nouveau membre du Club
    Inscrit en
    Mai 2007
    Messages
    45
    Détails du profil
    Informations forums :
    Inscription : Mai 2007
    Messages : 45
    Points : 30
    Points
    30
    Par défaut inclure un check box dans une table
    slt a tous j'utilise une table coté html ke je remplis a traver une fonction , je voudrais afecter a la derniere colone de la table des checkbox ke je cocherais par la suite mais je n'y arive pas voici mon code:


    <table border="7" cellpadding="1" BGCOLOR="#FFFFF9" >
    <tr >
    <th colspan="1" WIDTH="50%" ><font size="4" face="Palatino Linotype"><em> Nom du Model </em> </font> </th>
    <th colspan="1" WIDTH="10%" ><font size="4" face="Palatino Linotype"><em> Inports </em></font> </th>
    <th colspan="1" WIDTH="10%"> <font size="4" face="Palatino Linotype"> <em>Outports</em> </font> </th>
    <th colspan="1" WIDTH="10%" > <font size="4" face="Palatino Linotype"><em>Auteur</em> </font> </th>
    <th colspan="1" WIDTH="10%"> <font size="4" face="Palatino Linotype"> <em> Date</em> </font> </th>
    <th colspan="1" WIDTH="10%"> <font size="4" face="Palatino Linotype"> <em>Type </em></font> </th>
    <th colspan="1" WIDTH="10%"> <font size="4" face="Palatino Linotype"><em> Serveur</em> </font></th>
    <th colspan="1" WIDTH="10%"> <font size="4" face="Palatino Linotype"> <em>Prix(DA) </em></font> </th>
    <th colspan="1" WIDTH="10%"> <font size="4" face="Palatino Linotype"><em> Description</em> </font> </th>
    <th colspan="1" WIDTH="10%"> <font size="4" face="Palatino Linotype"><em> Selection</em> </font> </th>
    </tr>
    <% String [][] mat=new String[ligne][10];
    int i=0;
    int j=0;
    while(i<ligne){
    {
    mat[i][0] =(String)aa.elementAt(j);
    mat[i][1]=(String)aa.elementAt(j+1);
    mat[i][2] =(String)aa.elementAt(j+2);
    mat[i][3] =(String)aa.elementAt(j+3);
    mat[i][4]=(String)aa.elementAt(j+4);
    mat[i][5] =(String)aa.elementAt(j+5);
    mat[i][6] =(String)aa.elementAt(j+6);
    mat[i][7]=(String)aa.elementAt(j+7);
    mat[i][8] =(String)aa.elementAt(j+8);
    }
    i++;
    j=j+9;
    }
    int ii,jj;

    for (jj=0;jj<ligne;jj++){%>
    <tr>

    <% for (ii=0;ii<10;ii++) { %>
    <td>
    <%=mat[jj][ii] %>
    </td>
    <% } %>
    </tr>
    <% } %>

    </table>

    je veus que dans la colone selection le check box s'afiche j'ai tous essyer mais j'ai toujour des erreur s'il vous plais aidez moi!!!!!

    en fait je remplis la table avec des valeur que je recupere a partir d'un tableau en utilisant un service web donc toute les ligne de 0 a 9 se remplisse mais seuf la derniere je n'arive pas a lui afecter le chekc box

  2. #2
    Membre confirmé
    Homme Profil pro
    Développeur de jeux vidéo
    Inscrit en
    Mars 2006
    Messages
    400
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France, Nord (Nord Pas de Calais)

    Informations professionnelles :
    Activité : Développeur de jeux vidéo

    Informations forums :
    Inscription : Mars 2006
    Messages : 400
    Points : 562
    Points
    562
    Par défaut
    Pour afficher une checkbox, il faut utiliser la balise HTML INPUT :
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    <input type="checkbox">
    Pour que la checkbox soit initialement cochée, on peut rajouter le mot clé checked :
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    <input type="checkbox" checked>

Discussions similaires

  1. Afficher une check box dans un table.
    Par AngelBreizh dans le forum W4 Express
    Réponses: 1
    Dernier message: 07/03/2011, 09h17
  2. [XL-2003] Check Box dans une cellule
    Par juju1988 dans le forum Macros et VBA Excel
    Réponses: 6
    Dernier message: 13/09/2010, 11h59
  3. Réponses: 15
    Dernier message: 01/07/2008, 15h12
  4. [JTable] Check Box dans une cellule
    Par kkajout dans le forum Composants
    Réponses: 4
    Dernier message: 19/05/2008, 10h55
  5. Check box dans une JTable
    Par Mischka dans le forum Composants
    Réponses: 1
    Dernier message: 24/07/2007, 13h58

Partager

Partager
  • Envoyer la discussion sur Viadeo
  • Envoyer la discussion sur Twitter
  • Envoyer la discussion sur Google
  • Envoyer la discussion sur Facebook
  • Envoyer la discussion sur Digg
  • Envoyer la discussion sur Delicious
  • Envoyer la discussion sur MySpace
  • Envoyer la discussion sur Yahoo