Blogger Information
Blog 32
fans 0
comment 0
visits 19837
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
0413表格生成
XuanGG的博客
Original
604 people have browsed it

实例

<!DOCTYPE html>
<html lang="en" xmlns="http://www.w3.org/1999/html">
<head>
    <meta charset="UTF-8">
    <style type="text/css">
        form {
            text-align: center;
        }
b {
    color: cyan;
    text-align: center;

}
        button {
            color: deeppink;
            text-align: center;

        }
        input{
            color: palevioletred;
        }
        h2 {
            color: fuchsia;
            text-align: center;

        }

</style>
    <title>表格生成器</title>
</head>
<body>
<h2 >表格生成器 </h2>
<form action="test.php" method="GET">
   <b>输入行数</b> <input type="text" name="row"><br/>
   <b>输入行列数</b> <input type="text" name="cols"><br/>
    <button name="submit" value="提交">提交</button>






</form>
</body>
</html>

运行实例 »

点击 "运行实例" 按钮查看在线实例

实例

<?php
$row = $_GET['row'];
$cal = $_GET['cols'];
echo "<table border=1 align='center' width='80%'>";
echo '<tr>';
for($i=0;$i<$cal;$i++){
    echo '<th>i</th>';
}
echo '</tr>';

// 内容

for($k =0;$k<$row-1;$k++){
    echo '<tr>';
    for($z =0;$z<$cal;$z++){
        echo'<td>1</td>';

    }





    echo '</tr>';
}





echo '</table>';



?>
<a href="table.html">重置</a>

运行实例 »

点击 "运行实例" 按钮查看在线实例


Correction status:qualified

Teacher's comments:
Statement of this Website
The copyright of this blog article belongs to the blogger. Please specify the address when reprinting! If there is any infringement or violation of the law, please contact admin@php.cn Report processing!
All comments Speak rationally on civilized internet, please comply with News Comment Service Agreement
0 comments
Author's latest blog post