➥ JS Tutorial
- JS HOME
- JS introduction
- JS Where to
- JS Output
- JS Statements
- JS Syntax
- JS Variables
- JS Operators
- JS Assignment
- JS Data Types
- JS Functions
- JS Objects
- JS Events
- JS Sting methods
- JS String Search
- JS Arrays Methods
- JS Arrays
- JS Sorting Arrays
- JS Array Iteration
- JS Math Object
- JS Comparison & Logical Operators
- JS if else and else if
- JS Switch Statement
- JS For Loop
- JS For In
- JS For Of
- JS While Loop
- JavaScript Break
- JS Sets
- JavaScript typeof
- JS Type Conversion
- JS Bitwise Operations
- JS JSON
- JS Best Practices
- JS Reserved Words
- JS Number Methods
➥ JS Objects
➥ JS Functions
➥ JS Classes
➥ JS HTML DOM
- JavaScript HTML DOM
- JS HTML DOM Document
- JS HTML DOM Elements
- Changing HTML
- JS Forms
- JS HTML DOM - CSS
- DOM Events
- HTML DOM Event Listener
➥ JS Browser BOM
➥ JS Web APIs
➥ JS AJAX
➥ JS JSON
Tutorial
Server Response Properties
Property | Description |
---|---|
responseText | get the response data as a string |
responseXML | get the response data as XML data |
The responseText Property
The responseText
property returns the server response as a JavaScript string, and you can use it accordingly:
EXAMPLE ❯
The responseXML Property
The XMLHttpRequest object has an in-built XML parser.
The responseXML
property returns the server response as an XML DOM object.
Using this property you can parse the response as an XML DOM object:
EXAMPLE ❯
Server Response Methods
Method | Description |
---|---|
getResponseHeader() | Returns specific header information from the server resource |
getAllResponseHeaders() | Returns all the header information from the server resource |
The getAllResponseHeaders() Method
The getAllResponseHeaders()
method returns all header information from the server response.
EXAMPLE ❯
The getResponseHeader() Method
The getResponseHeader()
method returns specific header information from the server response.