-1

有人可以帮忙吗?我不知道如何将 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);
    }
4

1 回答 1

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>
于 2019-04-09T12:13:13.243 回答