Watch 3 Star 16 Fork 5

观观 / h5预览文档HTML

Join us
Explore and code with more than 2 million developers,Free private repositories !:)
Sign up
This repository doesn't specify license. Without author's permission, this code is only for learning and cannot be used for other purposes.
前端实现在线预览pdf、word、xls、ppt等文件 spread retract

Clone or download
index.html 847 Bytes
Copy Edit Web IDE Raw Blame History
观观 authored 2019-01-08 11:58 . '第一次提交'
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>h5预览word文档</title>
<style>
#iframe,#handout_wrap_inner{width: 50vw;height: 30vw;}
</style>
</head>
<body>
<!--pdf在线预览,需要调用下面js方法-->
<div id="handout_wrap_inner"></div>
<!--word文档在线预览 http://www.xdocin.com/xdoc?_func=to&_format=html&_cache=true&_xdoc=你的文档地址-->
<iframe src="http://www.xdocin.com/xdoc?_func=to&amp;_format=html&amp;_cache=1&amp;_xdoc=http://www.xdocin.com/demo/demo.docx" id="iframe"></iframe>
</body>
</html>
<script src="jquery-3.1.0.js"></script>
<script src="jquery.media.js"></script>
<script>
$('#handout_wrap_inner').media({
// width: '100%',
// height: '100%',
autoplay: true,
src:'ceshi.pdf',
});
</script>

Comment ( 0 )

Sign in for post a comment

HTML
1
https://gitee.com/zgw0223/h5_preview_document.git
git@gitee.com:zgw0223/h5_preview_document.git
zgw0223
h5_preview_document
h5预览文档
master

Help Search