当用户从其他网站输入网址时,如何创建将加载视频的模态 [英] how to create modal which will load video when user enters url from other website
本文介绍了当用户从其他网站输入网址时,如何创建将加载视频的模态的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我试过用波纹管代码直接在模态框内显示视频帧
i have tried with bellow code which directly displays video frame inside modal box
<div class="links" id="link6" data-toggle="modal" data-target="#myModalvid" title="Only Show Video Posts"></div>
<div class="modal fade" id="myModalvid" role="dialog">
<div class="modal-dialog modal-sm" >
<div class="modal-content" id="Div20">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal">×</button>
<h4 class="modal-title">Add Video</h4>
<asp:TextBox class="form-control" ID="txtvid" runat="server" placeholder="Enter Video URL"></asp:TextBox>
</div>
<div class="modal-body">
<iframe width="550" height="350" src="//www.youtube.com/embed/mwuPTI8AT7M?rel=0" frameborder="0"></iframe>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-primary" >Post</button>
<button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
</div>
</div>
</div>
</div>
i不知道如何实现它,当用户在文本框中输入视频网址时,它会自动生成在i-frame中显示视频。
i not getting any idea how to implement it , when user enters Video URL in Textbox it will automatically display video in i-frame.
推荐答案
可能会对你有帮助...请参考以下链接..
我没有使用你的代码来显示模态但是我使用过bootstrap模态..
JS小提琴
May be this will help you...Please refer the below link..
I didn't used your code to display modal but i had used bootstrap modal..
JS Fiddle
这篇关于当用户从其他网站输入网址时,如何创建将加载视频的模态的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文