我不知道这是否可能,但下面我有一个简单的 html 表:
<table id="plus" align="center">
  <tr>
    <th>
    </th>
  </tr>
</table>
如果if语句匹配,那么是否可以将图像附加到<th>上面的标签内?如果语句不匹配,那么我可以在<th>标签内附加图像链接吗?
下面是if语句,它实际上是 jQuery,其中包含一些 php 来尝试查找“textQuestion”:
if (qnum == <?php echo (int)$_SESSION['textQuestion']; ?>) {
  <img src="Images/plussigndisabled.jpg" width="30" height="30" alt="Look Up Previous Question" class="plusimage" name="plusbuttonrow"/>
} else {
  <a onclick="return plusbutton();">
  <img src="Images/plussign.jpg" width="30" height="30" alt="Look Up Previous Question" class="plusimage" name="plusbuttonrow"/>
  </a>
}