<!DOCTYPE HTML>
<html>
<head>
<title>测试视频播放</title>
<meta charset="utf-8">
</head>
<body>
<object id="MediaPlayer" classid="clsid:22D6F312-B0F6-11D0-94AB-0080C74C7E95" standby="Loading Windows Media Player components…" type="application/x-oleobject" codebase="http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=6,4,7,1112">
<param name="FileName" value="video/jiage.avi">
<param name="AutoStart" value="true">
<param name="ShowControls" value="true">
<param name="BufferingTime" value="2">
<param name="ShowStatusBar" value="true">
<param name="AutoSize" value="true">
<param name="InvokeURLs" value="false">
<param name="AnimationatStart" value="1">
<param name="TransparentatStart" value="1">
<param name="Loop" value="1">
<embed type="application/x-mplayer2" src="video/jiage.avi" name="MediaPlayer" autostart="1" showstatusbar="1" showdisplay="1" showcontrols="1" loop="0" videoborder3d="0" pluginspage="http://www.microsoft.com/Windows/MediaPlayer/" width="640" height="400"></embed>
</object>
</body>
</html>
以上,就是在html网页中播放avi视频的代码,因为借用的是Windows Media Player播放器,所以并不是所有浏览器都支持,应该只支持ie内核的浏览器,本人测试的360浏览器,如果对你有帮助,关注点赞,谢谢!