jquery Online preview pdf file, open PDF file (backwards compatible IE8, IE7)

Source: Internet
Author: User

The main thing is the use of a jquery plug-in jquery.media.js, the use of this plugin is easy to implement.

Core code

HTML code
  1. <! DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 transitional//en" "Http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd ">
  2. <html xmlns= "http://www.w3.org/1999/xhtml" xml:lang="ZH-CN" dir="ltr">
  3. <Meta http-equiv= "content-type" content= "text/html; Charset=utf-8 "/>
  4. <title>online View PDF</title>
  5. <script type="Text/javascript" src= "http://sources.ikeepstudying.com/js/ Jquery-1.8.3.min.js "></script>
  6. <script type="Text/javascript" src="Jquery.media.js"></Script >
  7. <script type="Text/javascript">
  8. $ (function () {
  9. $ (' A.media '). Media ({width:800, height:600});
  10. });
  11. </Script>
  12. </head>
  13. <body>
  14. <a class="Media" href="guice.pdf">pdf File</a>
  15. </body>
  16. </html>

View preview: http://sources.ikeepstudying.com/jquery.media/pdf.php

With Jquery.media.js, you can directly open a link to a PDF file to meet your needs.

Project Address: http://jquery.malsup.com/media/

Article turned from: http://justcoding.iteye.com/blog/2163072

jquery Online preview pdf file, open PDF file (backwards compatible IE8, IE7)

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.