FAQ about AJAX-part I

來源:互聯網
上載者:User
Q:
does AJAX use still use a request/response model?
A:
Actually, your pages are still making request and getting responses. you 'are using a different approach in how you make those requests and handle the response--now you use javascirpt to make the actual request, instead of just submitting  a web form.

Q:
why not just submit the form normally?what does using Ajax really do for us?
A:
The javascript code in an Ajax application sends your requess to be processed by the serer, but doesnot wait for an anser. even better, javascript can also work with the server's response, instead of reloading the entire page when the server is finished with your request.

Q:
So does the page ever get back a resposne?
A:
That's where the asynchronous part of Ajax comes in. when the serve sends back a response, javascript can update a page with new values, change an image, or even take the user to a whole new web page, And the user never has to wait around while all this is going in.

Q:
so should we use Ajax for all of my requests?
A:
    There are still of times when you'll want to use traditional web programming. for instance, when a form is totally filled out, you can let the user click a submit button, and then send the entire form to your web server, without using Ajax.
    But ,you 'll use Ajax for most of your dynamic page processing, like changing images,updating fields,and responding to users, if you only need to update part of a page, then Ajax is the way to go.

Q:
what's the relation XML with Ajax?
A:
sometimes, your javasript will use XML to talk back and forth with server, But you don't always need to use XML for your reqeusts.

Q:
    does use have to use a certain browser to use Ajax apps?
A:
    No, as long as your uses have javascript enabled in their web browers, this code should work without any problems. so your ajax apps wil run just fine on FireFox,Mozilla, IE,Netscape, and Opera.
    
Q:
    what if someone has javascript disabeld in their browser?
A:
    Unfortunately, Ajax apps require javascript to run. so users who have javacript disabled are not going to be able to use your ajax Apps.

Q:
    we got two ways to send our client data to server, POST and GET. maybe POST is better than  GET?
A:
    Post is usually used when you are sending a serer lots of data.  but Get is not like this.    

Q:
    what's DOM, and how the Dom with with a HTML Page?
A:
    Dom is the abbriviated form for Document Object Model. web Server use the DOM to represent an HTML web page. our javascript can use the DOM to update values in  a page. DOM can manipulate all elements in the HMTL page. for examples: document.getElementbyId("username") such like that..:)

相關文章

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.