主要方法的是在页面中插入jquery.media.js
下面是实例:
<html xmlns="http://www.w3.org/1999/xhtml"> <head runat="server"> <meta content="IE=7.0000" http-equiv="X-UA-Compatible"/> <title>pdf阅读</title> <script type="text/javascript" src="pdfview_files/jquery-1.7.2.min.js"></script> <script type="text/javascript" src="pdfview_files/jquery.media.js"></script> <script type="text/javascript"> $(function () { $('a.media').media({ width: 800, height: 800 }); }); </script> </head> <body> <form id="form1" runat="server"> <div id="main"><a class="media" href="../../灾害性天气典型个例/暴雨/河套西部一次局地大暴雨成因分析.pdf" id="PDFFile">河套西部一次局地大暴雨成因分析</a> </div> </form> </body> </html>