<%@ page language="java" contentType="text/html; charset=utf-8"
pageEncoding="utf-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>bigdata</title>
<script type="text/javascript" src="js/jquery-1.4.2.min.js"></script>
<script type="text/javascript">
$(function() {
$("#tj").click(function() {
// var params = {
// name : $("#xm").val(),
// inch : $("#sg").val()
// };
$.ajax({
type : "POST",
url : "rmirror/rmirror_getDwbRmirrorReqH.action",
//data : params,
dataType : "text", //return dataType: text or json
success : function(json) {alert(json.strResult)
var obj = $.parseJSON(json); // if dataType: text then change dataType to json
alert(obj.strResult);
},
error : function(json) {
alert("json=" + json);
return false;
}
});
});
});
</script>
</head>
<body>
<br>
<input type="button" value="getDwbRmirrorReqH" id="tj" />
<br>
</body>
</html>
原文:http://www.cnblogs.com/zhzhang/p/5085244.html