有人可以帮忙吗?我不知道如何在此选择中放入CSS。代码如下:
贡萨洛·席尔瓦
if(!isset($_POST['submeterTabela']) && !isset($_POST['submeterDados'])) {
$form ="<form action=\"$self\" method=\"post\">";
$form.="Selecciona Tabela<br><br><br><br>";
$result = $dbo->query("SHOW TABLES");
$form.= "<select name=Tabela>";
while ($row = $result->fetch(PDO::FETCH_NUM)) {
$form.= "<option value='$row[0]'>$row[0]</option>";
}
$form.= "</select>";
$form.="<input type=\"submit\" name=\"submeterTabela\" value=\"Submeter\">";
echo($form);
}
答案 0 :(得分:1)
您可以通过将类添加到select
元素来添加CSS
$form.= "<select name='Tabela' class='REPLACE-CLASS-NAME-HERE'>";
并在<style>
标签中定义类:
<style>
.REPLACE-CLASS-NAME-HERE {
color: red;
/* Add class definition here, this is a comment*/
}
</style>