使用div将sql记录到json [英] sql records to json using div

查看:87
本文介绍了使用div将sql记录到json的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何使用jquery ajax从div获取sql数据库值?

how to get sql database values from div using jquery ajax ?

推荐答案

有很多代码可以执行此操作。您需要一个Web服务,您可以从jQuery.ajax()方法调用它。然后在您的Web服务中,您将需要使用SqlHelper类或使用SqlConnection和SqlCommand类来运行您需要的sql。然后你返回它们并做你需要做的任何事情。
There is a lot of code to be able to do this. You'll need a web service and you can call that from jQuery.ajax() method. Then in your webservice you'll need to use your SqlHelper classes or use SqlConnection and SqlCommand classes to run the sql you need. Then you return them and do whatever you need to do.


这里涉及php,json和jquery ajax的综合教程,希望它有所帮助:



http://openenergymonitor.org/emon/node/107 [ ^ ]
A comprehensive tutorial here involving php, json, and jquery ajax, hope it helps:

http://openenergymonitor.org/emon/node/107[^]


这篇关于使用div将sql记录到json的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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