gpt4 book ai didi

jquery 选择带有 youtube embed src 的 iframe

转载 作者:行者123 更新时间:2023-12-01 08:19:25 26 4
gpt4 key购买 nike

如果我想通过其 src 选择所有 youtube iframe,如何实现这一点,我已经尝试了下面的 jquery 但它不起作用?嵌入源为 http://www.youtube.com/embed/videoid?rel=0

<script>
$('iframe[src="http://youtube.com/embed/"]')
</script>

最佳答案

您需要写src^="..."查找<iframe>srcstarts with ... .

关于jquery 选择带有 youtube embed src 的 iframe,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/8205584/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com