Html 如何使用变量创建适当的iframe
我试图为Youtube嵌入视频创建一个标记,其中src来自数据库的变量值 标签如下所示:Html 如何使用变量创建适当的iframe,html,youtube,Html,Youtube,我试图为Youtube嵌入视频创建一个标记,其中src来自数据库的变量值 标签如下所示: <iframe class="img-fluid w-100" width="560" height="315" src="https://www.youtube.com/embed/videoseries?list=PLx0sYbCqOb8TBPRdmBHs5Iftvv9TPboYG" frameborder="0" allow="autoplay; encrypted-media" allowfu
<iframe class="img-fluid w-100" width="560" height="315" src="https://www.youtube.com/embed/videoseries?list=PLx0sYbCqOb8TBPRdmBHs5Iftvv9TPboYG" frameborder="0" allow="autoplay; encrypted-media" allowfullscreen></iframe>
<iframe class="img-fluid w-100" width="560" height="315" src="{{frontPageConfig.recentVideos2.linkURL}}"
frameborder="0" allow="autoplay; encrypted-media" allowfullscreen></iframe>
我试着这样替换它:
<iframe class="img-fluid w-100" width="560" height="315" src="https://www.youtube.com/embed/videoseries?list=PLx0sYbCqOb8TBPRdmBHs5Iftvv9TPboYG" frameborder="0" allow="autoplay; encrypted-media" allowfullscreen></iframe>
<iframe class="img-fluid w-100" width="560" height="315" src="{{frontPageConfig.recentVideos2.linkURL}}"
frameborder="0" allow="autoplay; encrypted-media" allowfullscreen></iframe>
但无论是否使用{{variable},它都不起作用
谢谢。您可能需要像在中一样清理URL 尽管您可以发现这些版本存在一些问题: