表格的HTML行隐藏,显示时,没有正确格式化

时间:2017-04-10 05:51:23

标签: javascript html css

我对CSS样式不太好,无论如何我做了一个显示表格隐藏行的按钮,但是当我显示它时,表格没有正确格式化

这是按钮

<button type="button" name="bottone_modifica<?php echo $id;?>" onclick="modifica<?php echo $id;?>()">MODIF</button>

更改行的javascript

<script>
function modifica<?php echo $id;?> () {
modificato_tr_<?php echo $id;?>.style.display = "block";
}
</script>

和通常隐藏的行

<tr id="modificato_tr_<?php echo $id;?>" style="display: none;">
                <form class="form" method="post" action="">
                    <th>PREMI PER</th>
                    <th><input type="submit" name="bottone_modificato<?php echo $id;?>" value="CONFERMARE"></th>
                    <th><input type="date" name="data<?php echo $id;?>" value='<?php echo $data;?>'></th>
                    <th><input type="text" name="nome<?php echo $id;?>" size="10" maxlength="<?php echo $LENGTH_NOME;?>" value="<?php echo $nome;?>"></th>
                    <th><input type="text" name="valore<?php echo $id;?>" onkeypress='return event.charCode >= 46 && event.charCode <= 57' size="6" maxlength="<?php echo $LENGTH_PREZZO;?>" value="<?php echo $valore;?>"></th>
                    <th><input type="text" name="chilometri<?php echo $id;?>" onkeypress='return event.charCode >= 46 && event.charCode <= 57' size="6" maxlength="<?php echo $LENGTH_CHILOMETRI;?>" value="<?php echo $chilometri;?>"></th>
                    <th><textarea name="note<?php echo $id;?>" rows="3" cols="20" maxlength="250"><?php echo $note;?></textarea></th>
                </form>
            </tr>

你可以在这里看到php部分的代码和结果:http://www.onerentsrl.it/gestione-veicolo.php?id=102

0 个答案:

没有答案