云顶集团官网2018年孔子学院奖学金招生办法(中文) }
时间:2018-02-03 13:44:11
<script type="text/javascript">
$(function() {
showPdfFile($("#pdfshow").attr("value"));
});
function showPdfFile(pdflocal) {
var options = {
fallbackLink: "
点击这里下载文件"
};
// 下面代码都是处理IE浏览器的情况
if (window.ActiveXObject || "ActiveXObject" in window) {
//判断是否为IE浏览器,"ActiveXObject" in window判断是否为IE11
//判断是否安装了adobe Reader
for (x = 2; x < 10; x++) {
try {
oAcro = eval("new ActiveXObject('PDF.PdfCtrl." + x + "');");
if (oAcro) {
flag = true;
}
} catch (e) {
flag = false;
}
}
try {
oAcro4 = new ActiveXObject('PDF.PdfCtrl.1');
if (oAcro4) {
flag = true;
}
} catch (e) {
flag = false;
}
try {
oAcro7 = new ActiveXObject('AcroPDF.PDF.1');
if (oAcro7) {
flag = true;
}
} catch (e) {
flag = false;
}
if (flag) {
location = pdflocal;
} else {
layer.alert("对不起,您还没有安装PDF阅读器软件呢,为了方便预览PDF文档,请选择安装!",{icon: 6});
location = "http://ardownload.adobe.com/pub/adobe/reader/win/9.x/9.3/chs/AdbeRdr930_zh_CN.exe";
}
} else {
PDFObject.embed(pdflocal, "#pdfshow",options);
}
}
</script>