How to make an HTTP request

Posted rsapaper

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了How to make an HTTP request相关的知识,希望对你有一定的参考价值。

https://developer.mozilla.org/en-US/docs/AJAX/Getting_Started

In order to make an HTTP request to the server using javascript, you need an instance of a class that provides this functionality. This is where XMLHttpRequest comes in. Such a class was originally introduced in Internet Explorer as an ActiveX object called XMLHTTP. Then, Mozilla, Safari and other browsers followed, implementing an XMLHttpRequest class that supports the methods and properties of Microsoft‘s original ActiveX object. Meanwhile Microsoft has implemented XMLHttpRequest as well.

为了用JavaScript向服务器发送一个HTTP请求, 需要一个具备这种功能的类实例. 这样的类首先由Internet Explorer以ActiveX对象引入, 被称为XMLHTTP. 后来Mozilla, Safari 和其他浏览器纷纷仿效, 提供了XMLHttpRequest类,它支持微软的ActiveX对象所提供的方法和属性.

 

 

<script type="text/javascript">
<!--
    if(window.XMLHttpRequest){
        httpRequest = new XMLHttpRequest();
    } else if (window.ActiveObject)
    {
        httpRequest = new ActiveObject("Microsoft.XMLHTTP");
    }

//-->
</script>

 

以上是关于How to make an HTTP request的主要内容,如果未能解决你的问题,请参考以下文章

[转]Android How to Download and Make Volley.jar

csharp http://stackoverflow.com/questions/5915740/how-to-convert-a-typecode-to-an-actual-type/357029

How to throw an error in MySql procedure?

css 来自http://www.paulund.co.uk/how-to-create-an-animated-scroll-to-top-with-jquery

html 来自http://stackoverflow.com/questions/16504880/how-to-open-an-existing-program-in-client-device

how to install an older version of package via NuGet?