如何使用java Script连接sql server数据库和html5 web应用程序? [英] How to connect with sql server database and html5 web application using java Script?

查看:390
本文介绍了如何使用java Script连接sql server数据库和html5 web应用程序?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何使用java Script连接sql server数据库和html5 web应用程序?

How to connect with sql server database and html5 web application using java Script?

推荐答案

数据库操作在服务器端工作。您可以使用JS与服务器端进行交互。就是这样。
Database operations work at server side. You can use JS to interact with server side. That is it.


JavaScript用于客户端脚本,它无法连接到数据库。但是,您可以使用Ajax将客户端请求传递到服务器端脚本,如php,jsp或.net code-bebind,后者又连接到数据库以进行任何数据库操作,其结果将被传回通过服务器端脚本访问您的Ajax脚本。

参考: AJAX简介 [ ^ ]

您可以询问Google提供有关使用特定服务器端脚本执行Ajax的更多信息。
JavaScript is for client-side scripting, it cannot connect to the database. However, you can use Ajax to convey client-side request to the server-side scripting like php, jsp, or .net code-bebind, which in turn connect to the database for any database operations, the result of which will be passed back to your Ajax script through the server-side script.
Refer: AJAX Introduction[^]
You can ask Google for more info on Ajax implementation with specific server-side scripting.


这篇关于如何使用java Script连接sql server数据库和html5 web应用程序?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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