出于某种原因,如果可以选择与一组特定的相似样式属性匹配的所有 div 对我来说会容易得多。
我要选择的div示例
<div style="background-image: url(http://localhost/website/images/template/markers/cluster.png); height: 34px; line-height: 34px; width: 34px; text-align: center; cursor: pointer; color: rgb(255, 255, 255); position: absolute; font-size: 12px; font-family: Arial, sans-serif; font-weight: bold; top: 78.15521871251985px; left: 725.3256078213453px; background-position: 0px 0px; ">15</div>
除了这个div,其他需要选择的div可以和这个类似,只是说height
和top
left
职位。不过,好消息是 background-image url()
保持不变。
如何使用 jQuery 进行选择?谢谢!!
编辑
周边代码 更容易提供屏幕截图
最佳答案
关于javascript - 选择没有 .Class 或 #Id 的 div,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/10020596/