activexobject javascript需要跨浏览器替代方案 [英] Cross-browser alternative needed for activexobject javascript

查看:315
本文介绍了activexobject javascript需要跨浏览器替代方案的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

// Execute SQL to fetch Account records
  var db = new ActiveXObject("ADODB.Connection");
  var rs = new ActiveXObject("ADODB.Recordset");
  var sum = 0;
  db.Open(DB_NAME);
  rs.Open(sql, db);





我尝试过:



这是一个小应用程序,用于从存储在我计算机上的MS Access数据库中检索数据。该应用程序仅适用于IE,我希望它适用于所有主流浏览器



What I have tried:

This is a small app that retrieves data from MS Access database stored on my computer. The app only works in IE, I would like it to work with all major browsers

推荐答案

不要使用ACTIVEX。 (通常称为Active-Xcrement)



只有Microsoft浏览器支持它,并且任何有大脑的人都会避免使用它,因为它不安全。 br />


为Asp.Net网站编写ADO代码的例子太多,必须使用ActiveX。
DO NOT USE ACTIVEX. (Commonly referred to as "Active-Xcrement")

Only Microsoft browsers support it, and anyone with have a brain avoids using it because it's insecure.

There are too many examples of writing ADO code for an Asp.Net web site to have to use ActiveX.


你不要没有其他选择。



从客户端计算机上的某个位置访问数据无论如何都无法运行。这是一个安全风险(以及为什么没有人支持ActiveX!)并且任何浏览器都不允许这样做。



所有记录处理应该由服务器完成,而不是客户。客户端仅用于显示记录和编辑记录。完成记录修改后,应将更改的记录发送回服务器以写入数据库或其他后备存储。
You don't have an alternative.

Accessing data from somewhere on the client machine is not going to work anywhere. It's a security risk (and why nobody supports ActiveX any more!) and is not allowed by any browser.

All record handling should be done by the server, not the client. The client is just used to display records and edit them. Once the record modifications are complete, the changed records should be sent back to the server to be written to the database or other backing storage.


引用:

activexobject javascript所需的跨浏览器替代

Cross-browser alternative needed for activexobject javascript



没有,只有MSIE支持Activex。 Activex是一个主要的安全风险。



您需要重新考虑将ActiveX功能移动到服务器端。只有这是跨平台的。


There is none, Activex have only been supported by MSIE. Activex is a major security risk.

You need to rethink moving ActiveX functionality to server side. Only this is cross-platform.


这篇关于activexobject javascript需要跨浏览器替代方案的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆