• 显示pdf


       document.all[document.all.PDFNotKnown ? "IfNoAcrobat" : "IfAcrobat"].style.display = "block";

    @{
        Layout = null;
    }
    
    <!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>
        <meta charset="utf-8">
        <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
        <title>健康体检网上服务平台</title>
        <script src="../Scripts/jquery-1.7.1.js"></script>
        <script>
            $(function () {
                if ($('#reportUrl') != null) {
                    var url = $('#reportUrl').val();
                    if (url == null || url.length == 0) {
                        alert("还未出报告或报告有错误,请联系相关人员");
                    }
                }
                else {
                    alert("还未出报告或报告有错误,请联系相关人员");
                }
    
                document.all[document.all.PDFNotKnown ? "IfNoAcrobat" : "IfAcrobat"].style.display = "block";
            });
        </script>
    </head>
    <body>
        <div id="showdiv">
            @if (ViewData["ReportUrl"] != null)
            {
                <div>
                    <input type="hidden" value="@ViewData["ReportUrl"]" id="reportUrl" />
                </div>
            }
            @*<iframe src="@ViewData["ReportUrl"]" style="100%;height:700px;border:0;"></iframe> *@
            <noscript>
                Cannot determine if you have Acrobat Reader (or the full Acrobat) 
                installed <font size="-1">(because JavaScript is unavailable or 
                turned off)</font>. 
            </noscript>
            <div id="IfNoAcrobat" style="display: none">
                <a href="http://get.adobe.com/cn/reader/">你需要先安装Adobe Reader才能正常浏览文件,请点击这里下载Adobe Reader.</a>
            </div>
            <object type="application/pdf" style="display: none;  0; height: 0;">
                <div id="PDFNotKnown" style="display: none">&nbsp;</div>
            </object>
            <div id="IfAcrobat">
                <object classid="clsid:CA8A9780-280D-11CF-A24D-444553540000" width="100%" height="700px;" border="0" name="pdf">
                    <param name="toolbar" value="false">
                    <param name="_Version" value="65539">
    
                    <param name="_ExtentX" value="20108">
    
                    <param name="_ExtentY" value="10866">
    
                    <param name="_StockProps" value="0">
    
                    <param name="SRC" id="pdfName" value="@ViewData["ReportUrl"]">
                </object>
            </div>
        </div>
    </body>
    </html>


    
    
  • 相关阅读:
    DataTable不能通过已删除的行访问该行的信息解决方法
    datatable删除行之datatable.Rows[i].Delete()。标记之后行没有了
    js判断字符串是否在数组中
    发布webservice之后调用不通
    实体类配置xml相关属性排序问题、json前后台交互
    Java堆和栈的区别 经典总结
    Java IO
    XSL 简明教程 (下)
    XSL 简 明 教 程(上)
    跟我学XSL
  • 原文地址:https://www.cnblogs.com/jiangyou-lz/p/5592928.html
Copyright © 2020-2023  润新知