哪个html标签用于制作网格? [英] Which html tag is used to make grid?

查看:110
本文介绍了哪个html标签用于制作网格?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何制作一个尺寸取决于用户输入的网格,如果某些条件为真,那么它的一些盒子会用颜色填充.这是我的代码.如果我给出像这样的常量值
echo $ table_string = Table(4,3);它工作正常,但如果我通过用户输入(例如thi
)为它提供值 echo $ table_string = Table("noOfProcess,3);表未显示

how to make a grid whose size is based on user''s input and if certain conditions are true then its some of boxes is fill with a colour.This is my code.If i give constant values like this
echo $table_string= Table(4,3); it works fine but if i give it values through user''s input like thi
echo $table_string= Table("noOfProcess,3); table doesnt show

<html>

<head>
<title> Sheduling Algorithms </title>
</head>

<body>

<form method = "post" action = ""><br>
Number Of Processess: <input type = "text" name="noOfProcess" /><br>
<input type = "radio" name = "algo" value= "FCFS" /> FCFS <br>
<input type = "radio" name = "algo" value = "SPN" > SPN <br>
<input type = "radio" name = "algo" value = "SRT" /> SRT <br>
<input type = "radio" name = "algo" value = "RRH" /> RRH <br>
<input type= "submit">

</form>

</body>

</html>

<?php



function Table($rows,$columns)

{

     $table_string =
     "<table border='1' >
     <tr>
       <th> Process # </th>
       <th> Arrival Time </th>
       <th> Service Time</th>
     </tr>";

     for($j=0;$j<$columns;$j++)

     {

          $column_string.= "<td> asma </td> ";

     }

     for($i=0;$i<$rows;$i++)

     {

          $table_string.= "<tr>";

          $table_string.= $column_string."</tr>";
     }
     $table_string.="</table>";
     return $table_string;
}
$noOfProcess =  $_POST["noOfProcess"];
$algo =  $_POST["algo"];
echo $table_string= Table("noOfProcess",3);

推荐答案

table_string = Table(4,3);它工作正常,但如果我通过用户输入(例如thi
)为它提供值 echo
table_string= Table(4,3); it works fine but if i give it values through user''s input like thi
echo


table_string = Table("noOfProcess,3);表未显示

table_string= Table("noOfProcess,3); table doesnt show

<html>

<head>
<title> Sheduling Algorithms </title>
</head>

<body>

<form method = "post" action = ""><br>
Number Of Processess: <input type = "text" name="noOfProcess" /><br>
<input type = "radio" name = "algo" value= "FCFS" /> FCFS <br>
<input type = "radio" name = "algo" value = "SPN" > SPN <br>
<input type = "radio" name = "algo" value = "SRT" /> SRT <br>
<input type = "radio" name = "algo" value = "RRH" /> RRH <br>
<input type= "submit">

</form>

</body>

</html>

<?php



function Table(


行,


这篇关于哪个html标签用于制作网格?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆