如何使用Ajax [英] how to use Ajax

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

问题描述

大家好,

我在javascript工作,我想在javcascript中使用Ajax,

你可以告诉我如何在javascript中使用ajax,无论我是否必须包括

任何代码都包含* css或* .js文件,它有什么好处呢?


感谢你

解决方案

ba ***************** @ gmail.com 写道:

大家好,你可以告诉我如何在javascript中使用ajax,我是否必须包含
任何代码,包括* css或*。 js文件,它的好处是什么?

感谢你



我不确定你是谁,但谷歌可以当然有帮助。


搜索,阅读并回来提出具体问题,主题太多了。

广泛。


- -

Ian Collins。



ba ***************** @ gmail.com 写道:

大家好,我在javascript工作,我想在javcascript中使用Ajax,
你可以告诉我如何在javascript中使用ajax,我是否必须包含
任何代码,如包括* css或* .js文件,它有什么好处?

感谢你



http://en.wikipedia.org/wiki/AJAX


如果你正在使用AJAX,你可能会在你的html

文件中包含一个.js文件。

http://www.ajaxtoolbox.com


也可以看到yahoo ui连接库


Peter


BA ***************** @ gmail.com 写道:

大家好,
我在javascript工作,我想在javcascript中使用Ajax,
你可以告诉我如何在javascript中使用ajax ,无论我是否必须包含任何代码,如包含* css或* .js文件,它有什么好处呢?

感谢你



从这里开始:
http:/ /www.w3schools.com/ajax/default.asp

基本的Ajax使用实际上非常简单。

它归结为:

1)将返回XMLHTTPObject的函数(不同于浏览器到

浏览器。一个方便的例程发布在上面的URL)

2)使用此对象从某个地方检索一些内容。

(在大多数情况下,这将是服务器上的脚本做某事

有用,比如查询数据库)。所以你必须能够编写PHP或ASP

或者你的服务器是什么。)

3)将XMLHTTPObject返回的内容放在某个容器中通过

javascript,通常是div或span(可以是其他什么吗?)。


这就是它。


在这个XMLHTTPObject程序员必须使用所有

类型的技巧(如隐藏帧)之前的好日子里,与服务器进行通信,而不需要重新加载整个页面。现在生活更轻松。


享受。


问候,

Erwin Moller


Hi all,
Im working in javascript, I want to use Ajax in javcascript,
Can u tel me how to use ajax in javascript, whether i have to include
any code as like to include *css or *.js file, what are all the
benefit of it?

Thank U

解决方案

ba*****************@gmail.com wrote:

Hi all,
Im working in javascript, I want to use Ajax in javcascript,
Can u tel me how to use ajax in javascript, whether i have to include
any code as like to include *css or *.js file, what are all the
benefit of it?

Thank U


I''m not sure who U is, but google can certainly help.

Search, read and come back with specific questions, the subject is too
broad.

--
Ian Collins.



ba*****************@gmail.com wrote:

Hi all,
Im working in javascript, I want to use Ajax in javcascript,
Can u tel me how to use ajax in javascript, whether i have to include
any code as like to include *css or *.js file, what are all the
benefit of it?

Thank U



http://en.wikipedia.org/wiki/AJAX

If you are using AJAX you will likely include a .js file in your html
document.

http://www.ajaxtoolbox.com

also see the yahoo ui connection library

Peter


ba*****************@gmail.com wrote:

Hi all,
Im working in javascript, I want to use Ajax in javcascript,
Can u tel me how to use ajax in javascript, whether i have to include
any code as like to include *css or *.js file, what are all the
benefit of it?

Thank U


start here:
http://www.w3schools.com/ajax/default.asp

Basic Ajax usage is actually suprisingly simple.
It boild down to:
1) A function that will return a XMLHTTPObject (differs from browser to
browser. A handy routine is published in the above URL)
2) Use this object to retrieve some content from somewhere.
(In most cases this will be a script on the server that does something
usefull, like querying a database). So you must be able to write PHP or ASP
or whatever your serversideskill are.)
3) Place the content returned by the XMLHTTPObject in some container via
javascript, often a div or a span (can it be anything else?).

That''s about it.

In the good ols days before this XMLHTTPObject programmers had to use all
kind of tricks, like hidden frames, to communicate with the server without
reloading the whole page. Now life is easier.

Enjoy.

Regards,
Erwin Moller


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

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