XMLHttpRequest与HttpRequest [英] XMLHttpRequest Vs HttpRequest

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

问题描述

有人知道XMLHttpRequest可以使网页做什么吗,而普通的HttpRequest不能做到?

Does anyone know, what an XMLHttpRequest enables a web page to do, which cannot be done using a normal HttpRequest?

推荐答案

XMLHttpRequest 一个标准的javascript对象,可让您使用javascript从浏览器发出HTTP请求.

XMLHttpRequest in a standard javascript object that allows you to make HTTP Requests from the browser in javascript.

HttpRequest 服务器端对象,代表对服务器的请求.

HttpRequest is a server side object that represents a request to the server.

总而言之-一种在浏览器中工作,另一种在Web服务器中工作.他们还具有完全不同的角色. XMLHttpRequest用于在浏览器中获取Web资源. HttpRequest代表传入请求.

In summary - one works in the browser, the other in the web server. They also have completely different roles. XMLHttpRequest is for fetching web resources within the browser. HttpRequest represents an incoming request.

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

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