1这是显示:图片的
var imagehtml
2 = '<div class="formRow" style="white-space: nowrap;"><span><img align=\'center\' height=\'550px\' src="" class="image drop_shadow" alt="Sorry,this picture is not exist!" id="imgePreview" /><div class="preview_item_details" ></span></div>';
3 Asp.Net 控件很多:Image asp:image 均可
最简单强大的还是img的
4
显示Pdf:
这个需要浏览器的支持:
pdfhtml = '<object classid="clsid:CA8A9780-280D-11CF-A24D-444553540000" width="100%" height="100%" border="0">'
+ '<param name="_Version" value="65539">'
+ '<param name="_ExtentX" value="20108">'
+ '<param name="_ExtentY" value="10866">'
+ '<param name="_StockProps" value="0">'
+ '<param name="SRC" id="objSrc" value='+fileBytesUrl+'>'
+ '<object id="objPdf" data="'+
fileBytesUrl
+'" type="application/pdf" width="100%" height="100%" class="hiddenObjectForIE"/>'
+ '</object>';
Ext.core.DomHelper.overwrite(Ext.getCmp('txtPreviewDetails').el, pdfhtml);
其中“fileBytesUrl” 是Pdf 所在的路径(相对,绝对);还可以是“Url”;
显示视频播放器:
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="Web._Default" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title></title>
</head>
<body>
<form id="form1" runat="server">
<div align="center">
<iframe src="http://aboutplayer.com/bbsmp3/player/selectindex.htm" width="100%" height="30"
marginwidth="0" marginheight="0" hspace="0" vspace="0" frameborder="0" scrolling="no">
</iframe>
</div>
<object id="player" name="player" classid="clsid:CFCDAA03-8BE4-11cf-B84B-0020AFBBCCFA"
width="400" height="272">
<param name="_ExtentX" value="9869">
<param name="_ExtentY" value="7726">
<param name="AUTOSTART" value="-1">
<param name="SHUFFLE" value="0">
<param name="PREFETCH" value="0">
<param name="NOLABELS" value="0">
<param name="SRC" value=""><%--this Please should insert file Path--%>
<param name="CONTROLS" value="ImageWindow">
<param name="CONSOLE" value="Clip1">
<param name="LOOP" value="0">
<param name="NUMLOOP" value="0">
<param name="CENTER" value="0">
<param name="MAINTAINASPECT" value="0">
<param name="BACKGROUNDCOLOR" value="#000000">
</object>
<object align="middle" classid="CLSID:22d6f312-b0f6-11d0-94ab-0080c74c7e95" class="OBJECT"
id="MediaPlayer" width="500" height="350">
<param name="ShowStatusBar" value='-1' />
<param name="Filename" value="" />
<embed type="application/x-oleobject" codebase="http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=5,1,52,701"
flename="mp" src="http://goodknight.blogbus.com/goodknight.wmv" width="500" height="350"></embed>
</object>
<p align="center">
<object classid="clsid:CFCDAA03-8BE4-11cf-B84B-0020AFBBCCFA" height="60" width="352">
<param name="_ExtentX" value="9313">
<param name="_ExtentY" value="1588">
<param name="AUTOSTART" value="-1">
<param name="SHUFFLE" value="0">
<param name="PREFETCH" value="0">
<param name="NOLABELS" value="0">
<param name="SRC" value="">
<param name="CONTROLS" value="ControlPanel,StatusBar">
<param name="CONSOLE" value="Clip1">
<param name="LOOP" value="-1">
<param name="NUMLOOP" value="0">
<param name="CENTER" value="0">
<param name="MAINTAINASPECT" value="0">
<param name="BACKGROUNDCOLOR" value="#000000">
</object>
</p>
</form>
</body>
</html>