asp.net网页中不显示pdf 电脑在没有装pdf阅读器,网页中嵌入的pdf不能显示,这时,我想弹出个提示,安装PDF插件? 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 http://topic.csdn.net/u/20091109/10/278c55dc-0489-4214-a407-1006664a806d.html 我现在的pdf文件在网页上,已经能正常显示了,现在是如何判断客户端ie是否安装了pdf文件阅读器…… <script type="text/javascript"> function isAcrobatPluginInstall() { //Firefox if (navigator.plugins && navigator.plugins.length) { for (x = 0; x < navigator.plugins.length; x++) { if (navigator.plugins[x].name == 'Adobe Acrobat') return true; } } //IE else if (window.ActiveXObject) { for (x = 2; x < 10; x++) { try { oAcro = eval("new ActiveXObject('PDF.PdfCtrl." + x + "');"); if (oAcro) { return true; } } catch (e) { } } try { oAcro4 = new ActiveXObject('PDF.PdfCtrl.1'); if (oAcro4) { return true; } } catch (e) { } try { oAcro7 = new ActiveXObject('AcroPDF.PDF.1'); if (oAcro7) return true; } catch (e) { } } } if (!isAcrobatPluginInstall()) { alert('您的电脑没有安装PDF阅读器,PDF文档无法打开!'); } </script> GridView行中调用后台函数 【请教】从数据库中读取记录后,如何从0开始自动加1 私有字段“创建对象.car.chelun”已被赋值,但从未使用过它的值 是教程错了还是我错了? 一个<asp:Button>触发另一个<asp:LinkButton>时发生的随机现象 求限制字符串长度函数 请教web application重起的问题 图片显示大图 js 子窗口调用父窗口函数 请教在xp系统中用asp.net发送邮件的问题. 如何把这个Jsp 的方法改成asp.net 的方法呢? word文件上传问题
function isAcrobatPluginInstall() {
//Firefox
if (navigator.plugins && navigator.plugins.length) {
for (x = 0; x < navigator.plugins.length; x++) {
if (navigator.plugins[x].name == 'Adobe Acrobat')
return true;
}
}
//IE
else if (window.ActiveXObject) {
for (x = 2; x < 10; x++) {
try {
oAcro = eval("new ActiveXObject('PDF.PdfCtrl." + x + "');");
if (oAcro) {
return true;
}
}
catch (e) { }
}
try {
oAcro4 = new ActiveXObject('PDF.PdfCtrl.1');
if (oAcro4) {
return true;
}
}
catch (e) { }
try {
oAcro7 = new ActiveXObject('AcroPDF.PDF.1');
if (oAcro7)
return true;
}
catch (e) { }
}
}
if (!isAcrobatPluginInstall()) {
alert('您的电脑没有安装PDF阅读器,PDF文档无法打开!');
}
</script>