哦!  <EMBED 标签在实际的应用中是不推荐使用的!因为它不是标准标签,可以使用如下代码函数
public String showMedia(String fileExt,String fileUrl){
String outstr="";
String filetypelist="";
//flash
filetypelist = "swf|swi";
if (filetypelist.indexOf(fileExt) >= 0) {
    myheight="300px";
    outstr = "<embed src='"+ fileUrl+ "' quality=high            pluginspage='http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash' type='application/x-shockwave-flash' width=500 height=300></embed>";
}
//声音
filetypelist = "mp3|wma|wav|midi";
if (filetypelist.indexOf(fileExt) >= 0) {
   myheight="50px";
   outstr ="<object align=middle classid=CLSID:22d6f312-b0f6-11d0-94ab-0080c74c7e95 class=OBJECT id=MediaPlayer width=300 height=50 >"
   +"<param name=ShowStatusBar value=-1>"
   +"<param name=Filename value='"+fileUrl+"'>"
   +"<embed type=application/x-oleobject codebase=http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=5,1,52,701 flename=mp" 
   + "src='"+fileUrl+"' width=300 height=50 autostart='true'></embed></object>";
}//MP视频
filetypelist = "wmv|avi|asf|mov|mpeg|mpg";
if (filetypelist.indexOf(fileExt) >= 0) {
myheight="300px";
outstr ="<object align=middle classid=CLSID:22d6f312-b0f6-11d0-94ab-0080c74c7e95 class=OBJECT id=MediaPlayer width=400 height=300 >"
+"<param name=ShowStatusBar value=-1>"
+"<param name=Filename value='"+fileUrl+"'>"
+"<embed type=application/x-oleobject codebase=http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=5,1,52,701 flename=mp" 
+ "src='"+fileUrl+"' width=400 height=300 autostart='true'></embed></object>";
}

//RM格式
filetypelist = "rm|ram|rmvb";
if (filetypelist.indexOf(fileExt) >= 0) {
myheight="400px";
       outstr ="<object classid=clsid:CFCDAA03-8BE4-11cf-B84B-0020AFBBCCFA class=OBJECT id=RAOCX width=500 height=350>"
+"<PARAM NAME=SRC VALUE='"+fileUrl+"'>"
+"<PARAM NAME=CONSOLE VALUE=Clip1>"
+"<PARAM NAME=CONTROLS VALUE=imagewindow>"
+"<PARAM NAME=AUTOSTART VALUE=true>"
+"</OBJECT><br>"
+"<OBJECT classid=CLSID:CFCDAA03-8BE4-11CF-B84B-0020AFBBCCFA height=32 id=video2 width=500>"
+"<PARAM NAME=SRC VALUE='"+fileUrl+"'>"
+"<PARAM NAME=AUTOSTART VALUE=-1>"
+"<PARAM NAME=CONTROLS VALUE=controlpanel>"
+"<PARAM NAME=CONSOLE VALUE=Clip1></object>"
}
return outstr;
}