XMLHttpRequest Object निम्न Methods को Server से Interact करने की अनुमति है.
Property | Description |
---|---|
open(method, url, boolean) | Method URL और Boolean के प्रकार को Specifie करता है यदि Asynchronous या Handle Synchronous से False की तुलना में True है.
|
send("string") | String: केवल POST Method Request का उपयोग करता हैं. |
GET POST से सरल और तेज है इसलिए अधिकतर GET का उपयोग करते हैं.
Server पर बड़ी मात्रा मे Data भेजने पर POST Request का इस्तेमाल होता है Update मे Server पर भी शामिल होता है POST GET से सुरक्षित और मजबूत तरीका है.
Server पर बड़ी मात्रा मे Data भेजने पर POST Request का इस्तेमाल होता है.
xmlhttp.open("GET", url, true) // xmlhttp is variable name
xmlhttp.send()
For Example
req.open("GET", "ajax_demo.txt", true); // req is variable name
req.send(null);
xmlhttp.open("POST", url, true) // xmlhttp is variable name
xmlhttp.send(String)
For Example
req.open("POST", "ajax_demo.txt", true); // req is variable name
req.send("hitesh");