页面上的图像?
你可以用jQuery做到这一点:
<body>
<!-- your content including the image -->
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.4.4/jquery.min.js"></script>
<script type="text/javascript">
$(function() {
var myimg = $('img[src="/some/path/to/img.jpg"]');
});
</script>
</body>
Run Code Online (Sandbox Code Playgroud)
这使用tag-selector(docs)和attribute-equals-selector(docs)来获取匹配所需源的img元素src.
| 归档时间: |
|
| 查看次数: |
255 次 |
| 最近记录: |