[英]How to connect html5 mobile web app to an iis server to get info from the sql server database?
I think the question is self explanatory. 我认为这个问题是不言自明的。 How can i get info from sql server database and pass it to my web app so the content is dynamic. 我如何从sql server数据库中获取信息并将其传递到我的Web应用程序,以便内容是动态的。 How to make a connectivity between html5 and the server? 如何在html5和服务器之间建立连接? I know is using ajax any examples???? 我知道使用ajax的任何示例吗??? How to do it without jquery? 没有jQuery怎么办? With phonegap? 有电话间隙吗?
You can make an ajax call from your web app / phonegap app using jquery ajax like this.. 您可以使用jquery ajax从Web应用程序/ phonegap应用程序进行ajax调用。
$.ajax({
url: "http://yoursite.com/getuser.aspx",
context: document.body
}).done(function() {
$(this).addClass("done");
});
In this case yoursite.com is your domain and the aspx page in its code behind will connect to sql server and get data out. 在这种情况下,yoursite.com是您的域,其代码后面的aspx页面将连接到sql server并获取数据。 You can also add some security to this using oAuth or some form of login token auth if you need to. 如果需要,您还可以使用oAuth或某种形式的登录令牌auth来为此添加一些安全性。 Does that help? 有帮助吗?
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.