首先,windows系統必須安裝預覽插件!css
html代碼中書寫以下!html
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <base href="http://127.0.0.1:8096/draw/"> <title>dwg圖紙瀏覽</title> <meta http-equiv="pragma" content="no-cache"> <meta http-equiv="cache-control" content="no-cache"> <meta http-equiv="expires" content="0"> <meta http-equiv="keywords" content="keyword1,keyword2,keyword3"> <meta http-equiv="description" content="This is my page"> <!-- <link rel="stylesheet" type="text/css" href="styles.css"> --> </head> <body> <OBJECT id="DWGViewX" classid="clsid:AC53EFE4-94A7-47E6-BBFC-E9B9CF322299" codebase="/draw/download/dwgviewx.cab" width="1200" height="750"> <param name="_Version" value="65536"> <param name="_ExtentX" value="18521"> <param name="_ExtentY" value="13758"> <param name="_StockProps" value="0"> <!-- http://127.0.0.1:8096/draw/upload/201610/20161012104324045_829.dwg c:\a.dxg ${fileUrl} 此處必須用文件的靜態路徑,流路徑測試失敗! --> <param name="DrawingFile" value="c:\a.dwg"> <param name="ShowToobar" value="-1"> <param name="ShowLayoutBar" value="1"> </OBJECT> </body> </html>
IE瀏覽器插件代碼windows