728x90
SMALL
ajax javascript
function getSggNm(sggCd){
var allData = {
sggCd : sggCd
};
var url = '/usr/sub/getSggNm.do';
getResult(url,allData);
}
function getResult(url, allData){
console.log(allData);
$.ajax({
async : false,
type: "POST",
url : url,
dataType : "json",
data: allData,
success : function(data) {
console.log(data);
return data;
},
error : function() {
}
});
}
controller
@RequestMapping("/usr/sub/getSggNm.do")
public String getSggNm(@RequestParam Map<String, Object> paramMap) throws Exception {
System.out.println(paramMap);
String sggNm= lifewtRcyService.getSggNm(paramMap);
return sggNm;
}
728x90
LIST
'Front > AJAX' 카테고리의 다른 글
[ajax]Uncaught SyntaxError: Invalid shorthand property initializer (0) | 2021.11.08 |
---|---|
status(요청상태) (0) | 2020.12.09 |
사원조회(JSON) (0) | 2020.12.09 |
사원조회(XML) (0) | 2020.12.09 |
사원정보조회 (0) | 2020.12.09 |
댓글