美文网首页
知识点20:AJAX

知识点20:AJAX

作者: BryantHe | 来源:发表于2017-04-03 16:21 被阅读16次

And by specifically when I say updating a page's content, I'm not saying we rewrite the page using JavaScript. I'm saying we actually request more information from the server without our page having to reload.

Now, it's very easy to do this. We just say var, whatever we want to call this object, equals new XMLHttpRequest.

And now we have now obtained an AJAX sort of object, or an XMLHttpRequest object, which will allow us to asynchronously update our page.

After we have gotten this new object, this XMLHttpRequest, we have to do something to its onreadystatechange behavior.

Onreadystatechange behavior is really just when you make a request to a web page, the page goes through a number of steps.

First, a request hasn't been sent.

Then, the request has been sent, but not acted upon.

Then the request has been acted upon.

Then the request is being sent back to you.

Then, the request is fully loaded in your page.

Those are different states.

So what does this maybe look like in context?

So here's a function that deals with AJAX requests.

相关文章

  • 知识点20:AJAX

    And by specifically when I say updating a page's content,...

  • JavaWeb学习-Ajax-1-Ajax简介

    JavaWeb学习-Ajax-1-Ajax简介 进入到一个新的知识点的学习,这个知识点叫做Ajax,指的是异步的j...

  • 前端知识点总结——AJAX

    前端知识点总结——Ajax 1.ajax 2.HTTP协议 2.1请求头 2.2响应(response)消息 2....

  • Ajax小案例之获取后台信息显示

    知识点:数据传输--------jsonjquery-----------.ajax()获取**html部分 注...

  • 关于AJAX

    1.需要掌握以下知识点 ①,AJAX全称(Asynchronous JavaScript and XML),异步 ...

  • Ajax知识点

    1.Ajax是什么:AJAX 是一种在无需重新加载整个网页的情况下,能够更新部分网页的技术。2.两种常用的数据格式...

  • ajax知识点

    概念: “Asynchronous Javascript And XML”(异步Javascript和XML),是...

  • ajax知识点

  • ajax文件交互跨域问题

    title: AJAX(音乐app)date: 2017-04-20 08:35:17tags: ajax 关于A...

  • 2.爬虫基础2

    1.post 2.ajax ajax-get豆瓣电影排行榜1.分析请求字符串start=20&limit=20每页...

网友评论

      本文标题:知识点20:AJAX

      本文链接:https://www.haomeiwen.com/subject/vzgwottx.html