IE、Chrome等浏览器实现PDF预览(原)
IE、Chrome等浏览器实现PDF预览
<!doctype html>
<html>
<head>
<meta http-equiv="content-type"content="text/html; charset=gb2312">
<meta http-equiv="content-style-type"content="text/css">
<meta http-equiv="content-script-type"content="text/javascript">
<title>Checking If PDF </title>
<script type="text/javascript">
function checkPDF(){
/
*if(!!(ElementById('PDFNotKnown'))){
}
else{
}*/
}
</script>
</head>
<body onload="checkPDF()">
<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="IfNoPDFAXExist" >
你需要先安装pdf阅读器才能正常浏览⽂件,请点击<a href="get.adobe/cn/reader/download/?installer=reader_11.0_chinese_simplified_for_windows" target="_blank">这⾥</a>下载.
</div>-->
<object id="PDFViewObject"type="application/pdf"width='100%' height='100%' data='mxl.pdf' >
html实现用户注册登录代码
<!--这⾥⾯的div只有浏览器不⽀持application/pdf时才会被显⽰-->
<!--IE8以及以下版本的IE在浏览器不⽀持application/pdf时不会加载下⾯的div从⽽可以通过上⾯的checkPDF来处理,
IE9以及以后的版本以及Chrome都会加载,所以⽆效-->
<div id="PDFNotKnown">你需要先安装pdf阅读器才能正常浏览⽂件,请点击<a href="get.adobe/cn/reader/download/?
installer=reader_11.0_chinese_simplified_for_windows"target="_blank">这⾥</a>下载.</div>
</object>
<!--<embed id="IfPDFAXExist" width="100%" height="100%" name="plugin" src="mxl.pdf" type="application/pdf">-->
</body>
</html>