我有
<div id="aa">
<img src="." height="17" alt="example1" title="">
<table>
<tbody><tr>
<th></th>
<td></td>
</tbody>
</table>
<img src="." height="17" alt="example2" title="">
<table>
<tbody><tr>
<th></th>
<td></td>
</tbody>
</table>
<img src="." height="17" alt="example3" title="">
<table>
<tbody><tr>
<th></th>
<td></td>
</tbody>
</table>
</div>
我只想选择图像的属性“alt”值“示例 1、示例 2、示例 3”。我怎样才能得到它们。
最佳答案
要选择一些属性使用选择器 img[alt="example1"], img[alt="example2"], img[alt="example3"]
关于css - 选择图片的 alt 属性,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/25520199/