ajax post/get 방식
Language/JAVA 2010. 10. 19. 12:09//post
name = encodeURIComponent(document.getElementById("myName").value);
xmlHttp.open("POST", "quickstart.php", true);
xmlHttp.setRequestHeader("Content-Type", "application/x-www-form-urlencoded; charaset=UTF-8");
data = "name="+name;
xmlHttp.onreadystatechange = handleServerResponse;
xmlHttp.send(data);
//get
name = encodeURIComponent(document.getElementById("myName").value);
xmlHttp.open("POST", "quickstart.php?name="+name, true);
xmlHttp.onreadystatechange = handleServerResponse;
xmlHttp.send(null);
name = encodeURIComponent(document.getElementById("myName").value);
xmlHttp.open("POST", "quickstart.php", true);
xmlHttp.setRequestHeader("Content-Type", "application/x-www-form-urlencoded; charaset=UTF-8");
data = "name="+name;
xmlHttp.onreadystatechange = handleServerResponse;
xmlHttp.send(data);
//get
name = encodeURIComponent(document.getElementById("myName").value);
xmlHttp.open("POST", "quickstart.php?name="+name, true);
xmlHttp.onreadystatechange = handleServerResponse;
xmlHttp.send(null);
'Language > JAVA' 카테고리의 다른 글
자바(java)에서 사용하는 정규표현식(Regular expression)(01) (0) | 2013.08.01 |
---|---|
JAXB : IllegalAnnotationExceptions - Class has two properties of the same name (0) | 2013.07.18 |
Using JAX-RS With JAXB (0) | 2013.07.10 |
Code Examples of POIFSFileSystem (0) | 2012.12.26 |
toJSONString() (0) | 2010.10.19 |