2014. 7. 22. 16:10

보호되어 있는 글입니다.
내용을 보시려면 비밀번호를 입력하세요.

2014. 7. 11. 17:28

보호되어 있는 글입니다.
내용을 보시려면 비밀번호를 입력하세요.

2014. 7. 4. 15:42

보호되어 있는 글입니다.
내용을 보시려면 비밀번호를 입력하세요.

2014. 6. 9. 17:13

보호되어 있는 글입니다.
내용을 보시려면 비밀번호를 입력하세요.

2014. 5. 14. 09:14

보호되어 있는 글입니다.
내용을 보시려면 비밀번호를 입력하세요.

2014. 5. 8. 11:31

보호되어 있는 글입니다.
내용을 보시려면 비밀번호를 입력하세요.

2014. 5. 8. 10:36

보호되어 있는 글입니다.
내용을 보시려면 비밀번호를 입력하세요.

2014. 5. 7. 15:58

보호되어 있는 글입니다.
내용을 보시려면 비밀번호를 입력하세요.

Powerbuilder2014. 4. 15. 16:46


http://msdn.microsoft.com/en-us/library/ie/ms535874(v=vs.85).aspx
http://msdn.microsoft.com/en-us/library/ie/cc848898(v=vs.85).aspx

xml Parser           {D2423620-51A0-11D2-9CAF-0060B0EC3D39}

Msxml2.XMLHTTP       {F6D90F16-9C73-11D3-B32E-00C04F990BB4}
Msxml2.XMLHTTP.3.0   {F5078F35-C551-11D3-89B9-0000F81FE221}
Msxml2.XMLHTTP.6.0   {88d96a0a-f192-11d4-a65f-0040963251e5}


XMLHttpRequest object

Represents an XML request using HTTP.

Members

The XMLHttpRequest object has these types of members:

Events

The XMLHttpRequest object has these events.

EventDescription
onreadystatechange

Sets or retrieves the event handler for asynchronous requests.

ontimeout

Raised when there is an error that prevents the completion of the request.

 

Methods

The XMLHttpRequest object has these methods.

MethodDescription
abort

Cancels the current HTTP request.

addEventListener

Registers an event handler for the specified event type.

dispatchEvent

Sends an event to the current element.

getAllResponseHeaders

Returns the complete list of response headers.

getResponseHeader

Returns the specified response header.

open

Assigns method, destination URL, and other optional attributes of a pending request.

overrideMimeType

Sets the Content-Type header for the response to the MIME provided. This method is not implemented in IE.

removeEventListener

Removes an event handler that the addEventListener method registered.

send

Sends an HTTP request to the server and receives a response.

setRequestHeader

Adds custom HTTP headers to the request.

 

Properties

The XMLHttpRequest object has these properties.

PropertyAccess typeDescription

constructor

Returns a reference to the constructor of an object.

readyState

Retrieves the current state of the request operation.

response

Read-only

Returns the response received from the server.

responseBody

Retrieves the response body as an array of unsigned bytes.

responseText

Retrieves the response body as a string.

responseType

Read/write

Describes the data type of the response associated with the request.

responseXML

Retrieves the response body as an XML DOM object.

status

Retrieves the HTTP status code of the request.

statusText

Retrieves the friendly HTTP status of the request.

timeout

Gets or sets the time-out value.

withCredentials

Read/write

Indicates whether user credentials should be included with the request.

 

Standards information

Remarks

The XMLHttpRequest property is available on the window object.

var oReq = new XMLHttpRequest;

Starting with Internet Explorer 10 in Windows 8, the responseXML property returns a native XML document. This can affect webpages written for earlier versions of Windows Internet Explorer, but makes it more compatible with other browsers.

For previous version of Internet Explorer, the additional step of passing responseText through DOMParser.

var xhr = new XMLHttpRequest();

//...

var parser = new DOMParser();

var doc = parser.parseFromString(xhr.responseText, 'text/xml');

// 'doc' contains a native document in both IE9 and IE10


With Internet Explorer 10 in Windows 8, the use of responseXML simplifies getting a native XML document.

var xhr = new XMLHttpRequest();

//...

var doc = xhr.responseXML;

// 'doc' contains a native document in IE10’s Standards and Quirks document modes

// it contains an MSHTML document in IE9 and in IE10’s compatibility document modes


For more info, see XMLHttpRequest responseXML in Internet Explorer 10.

With the XMLHttpRequest object, clients can retrieve and submit XML data directly to a web server without reloading the document. To convert XML data into renderable HTML content, use the client-side XML DOM or Extensible Stylesheet Language Transformations (XSLT) to compose HTML elements for presentation.

The native scripting object also supports the use of expandos (custom properties), and properly recognizes the 'this' notation of JavaScript.

The XMLHttpRequest property is available on the window object in Windows Internet Explorer 7.

var oReq = new XMLHttpRequest;

To support versions of Windows Internet Explorer prior to Internet Explorer 7, use the following function to get the XMLHttpRequest object.

function getXMLHttpRequest() 
{
    if (window.XMLHttpRequest) {
        return new window.XMLHttpRequest;
    }
    else {
        try {
            return new ActiveXObject("MSXML2.XMLHTTP.3.0");
        }
        catch(ex) {
            return null;
        }
    }
}

Examples

The following script demonstrates how to create and use the XMLHttpRequest object. For best client-side performance, the XMLHTTP request is asynchronous and uses an onreadystatechange event handler to process the data returned by the call. The script uses the getXMLHttpRequest() function defined above to create the request object.

function handler()
{
    if (oReq.readyState == 4 /* complete */) {
        if (oReq.status == 200) {
            console.log(oReq.responseText);
        }
    }
}
var oReq = getXMLHttpRequest();
if (oReq != null) {
    oReq.open("GET", "http://localhost/test.xml", true);
    oReq.onreadystatechange = handler;
    oReq.send();
}
else {
    window.console.log("AJAX (XMLHTTP) not supported.");
}

Posted by Julyus
2014. 4. 10. 16:27

보호되어 있는 글입니다.
내용을 보시려면 비밀번호를 입력하세요.