如何设置onclick功能echo "<td>" . $row['norm_name'] . "</td>";
单击它时,应打开一个模态,您可以从中选择一个选项,为该行指定一个外键。我该怎么做
$sql = "SELECT norm_name FROM Norm WHERE theme_id IS NULL";
if($result = mysqli_query($link, $sql)){
if(mysqli_num_rows($result) > 0){
echo "<table>";
echo "<tr>";
echo "<th>Norm</th>";
echo "</tr>";
while($row = mysqli_fetch_array($result)){
echo "<tr>";
echo "<td>" . $row['norm_name'] . "</td>";
echo "</tr>";
}
echo "</table>";
// Free result set
mysqli_free_result($result);
}