Javascript 将视频链接添加到视频html
我想在文本框中输入一个url,并能够将该url镜像到视频html。 示例url: 我认为这应该是可能的使用js。 这就是html最初的样子Javascript 将视频链接添加到视频html,javascript,jquery,html5-video,Javascript,Jquery,Html5 Video,我想在文本框中输入一个url,并能够将该url镜像到视频html。 示例url: 我认为这应该是可能的使用js。 这就是html最初的样子 <input type="text" value="" /> <video width="320" height="240"> <source type="video/mp4" src=""/> </video> 输入url后,html将如下所示 <input type="text" val
<input type="text" value="" />
<video width="320" height="240">
<source type="video/mp4" src=""/>
</video>
输入url后,html将如下所示
<input type="text" value="http://www.example.com/video.mp4" />
<video width="320" height="240">
<source type="video/mp4" src="http://www.example.com/video.mp4"/>
</video>
然后,我将扩展此功能,以支持所有三种视频格式和三个文本字段。可能的@askovpen副本您的解决方案效果很好。我把它改了一点,这样就不需要go按钮了。请回答这个问题,我会选择你的作为最佳答案。