如何用HTML5将一个插件嵌入网页中! 5
2个回答
展开全部
如果是要插入视频的插件的话推荐
先下载jwplayer插件
引入插件JS文件
<script src="js/jquery/jquery-1.6.2.js" type="text/javascript"></script>
<script src="js/plugins/mediaplayer-5.7/jwplayer.js" type="text/javascript"></script>
JS中引入播放器
<script type="text/javascript">
var thePlayer;
$(function() {
thePlayer = jwplayer('container').setup({
flashplayer: 'js/plugins/mediaplayer-5.7/player.swf',
file: 'js/plugins/mediaplayer-5.7/video.mp4',
width: 500,
height: 350,
dock: false
});
</script>
或者直接采用<video>标签
先下载jwplayer插件
引入插件JS文件
<script src="js/jquery/jquery-1.6.2.js" type="text/javascript"></script>
<script src="js/plugins/mediaplayer-5.7/jwplayer.js" type="text/javascript"></script>
JS中引入播放器
<script type="text/javascript">
var thePlayer;
$(function() {
thePlayer = jwplayer('container').setup({
flashplayer: 'js/plugins/mediaplayer-5.7/player.swf',
file: 'js/plugins/mediaplayer-5.7/video.mp4',
width: 500,
height: 350,
dock: false
});
</script>
或者直接采用<video>标签
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询