XML 튜토리얼

XML 홈 XML 소개 XML 사용 방법 XML 트리 XML 구문 XML 요소 XML 속성 XML 네임스페이스 XML 표시 XML HttpRequest XML 파서 XML DOM XML XPath XML XSLT XML XQuery XML XLink XML 유효성 검사기 XML DTD XML 스키마 XML 서버 XML 예제 XML 퀴즈 XML 인증서

XML AJAX

AJAX 소개 AJAX XMLHttp AJAX 요청 AJAX 응답 AJAX XML 파일 AJAX PHP AJAX ASP AJAX 데이터베이스 AJAX 애플리케이션 AJAX 예제

XML DOM

DOM 소개 DOM 노드 DOM 액세스 DOM 노드 정보 DOM 노드 목록 DOM 순회 DOM 탐색 DOM 값 가져오기 DOM 변경 노드 DOM 제거 노드 DOM 교체 노드 DOM 생성 노드 DOM 추가 노드 DOM 복제 노드 DOM 예제

XPath 튜토리얼

XPath 소개 XPath 노드 XPath 구문 XPath 축 XPath 연산자 XPath 예제

XSLT 튜토리얼

XSLT 소개 XSL 언어 XSLT 변환 XSLT <템플릿> XSLT <값> XSLT <각각> XSLT <정렬> XSLT <만약> XSLT <선택> XSLT 적용 클라이언트의 XSLT 서버의 XSLT XSLT XML 편집 XSLT 예

XQuery 튜토리얼

XQuery 소개 XQuery 예제 XQuery FLWOR 엑스쿼리 HTML XQuery 용어 XQuery 구문 XQuery 추가 XQuery 선택 XQuery 함수

XML DTD

DTD 소개 DTD 빌딩 블록 DTD 요소 DTD 속성 DTD 요소 대 속성 DTD 엔터티 DTD 예

XSD 스키마

XSD 소개 XSD 방법 XSD <스키마> XSD 요소 XSD 속성 XSD 제한 사항

XSD 컴플렉스

XSD 요소 XSD 비어 있음 XSD 요소만 XSD 텍스트만 XSD 혼합 XSD 지표 XSD <모든> XSD <모든 속성> XSD 대체 XSD 예

XSD 데이터

XSD 문자열 XSD 날짜 XSD 숫자 XSD 기타 XSD 참조

서비스

XML 서비스 XML WSDL XML SOAP XML RDF XML RSS

참고문헌

DOM 노드 유형 DOM 노드 DOM 노드 목록 DOM NamedNodeMap DOM 문서 DOM 요소 DOM 속성 DOM 텍스트 DOM CDATA DOM 주석 DOM XMLHttpRequest DOM 파서 XSLT 요소 XSLT/XPath 함수

XMLHttpRequest 객체 _


XMLHttpRequest 객체를 사용하면 전체 페이지를 다시 로드하지 않고도 웹 페이지의 일부를 업데이트할 수 있습니다.


직접 해보십시오 - 예


간단한 XMLHttpRequest를 만들고 TXT 파일에서 데이터를 검색합니다.


헤더 정보를 검색합니다. 리소스(파일)의 헤더 정보를 검색합니다.


검색합니다. 리소스(파일)의 특정 헤더 정보를 검색합니다.


사용자가 입력 필드에 문자를 입력하는 동안 웹 페이지가 웹 서버와 통신하는 방법.


웹 페이지가 XMLHttpRequest 개체를 사용하여 데이터베이스에서 정보를 가져오는 방법.


검색 XMLHttpRequest를 만들어 XML 파일에서 데이터를 검색하고 HTML 테이블에 데이터를 표시합니다.


XMLHttpRequest 객체

XMLHttpRequest 객체는 배후에서 서버와 데이터를 교환하는 데 사용됩니다.

XMLHttpRequest 객체는 개발자의 꿈 입니다 .

  • 페이지를 새로고침하지 않고 웹페이지 업데이트
  • 페이지가 로드된 후 서버에서 데이터 요청
  • 페이지가 로드된 후 서버에서 데이터 수신
  • 백그라운드에서 서버로 데이터 보내기


XMLHttpRequest 객체 메소드

Method Description
abort() Cancels the current request
getAllResponseHeaders() Returns header information
getResponseHeader() Returns specific header information
open(method,url,async,uname,pswd) Specifies the type of request, the URL, if the request should be handled asynchronously or not, and other optional attributes of a request

method: the type of request: GET or POST
url: the location of the file on the server
async: true (asynchronous) or false (synchronous)
send(string) send(string) Sends the request off to the server.

string: Only used for POST requests
setRequestHeader() Adds a label/value pair to the header to be sent

XMLHttpRequest 객체 속성

Property Description
onreadystatechange Stores a function (or the name of a function) to be called automatically each time the readyState property changes
readyState Holds the status of the XMLHttpRequest. Changes from 0 to 4:
0: request not initialized
1: server connection established
2: request received
3: processing request
4: request finished and response is ready
responseText Returns the response data as a string
responseXML Returns the response data as XML data
status Returns the status-number (e.g. "404" for "Not Found" or "200" for "OK")
statusText Returns the status-text (e.g. "Not Found" or "OK")