jQuery选择iframe与youtube嵌入src [英] jquery select iframe with youtube embed src
本文介绍了jQuery选择iframe与youtube嵌入src的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
如果我想通过其src选择所有个youtube iframe,该如何实现,我已经尝试了以下jQuery,但无法正常工作?
嵌入的src是http://www.youtube.com/embed/videoid?rel=0
If i want to select all youtube iframes via their src how can this be achieved, i have tried the jquery below but it won't work?
the embed src is http://www.youtube.com/embed/videoid?rel=0
<script>
$('iframe[src="http://youtube.com/embed/"]')
</script>
推荐答案
You need to write src^="..."
to find <iframe>
s with src
that starts with ...
.
这篇关于jQuery选择iframe与youtube嵌入src的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文