<html>
<head>
<script src="/js/jquery.js">
</script>
<script>
$( document ).ready(function() {
$("#btn").click(function( event ) {
$.ajax({
url: "/xxx.htm",
type: "get",
dataType: 'json',
data: "",
success: function(json){
$("#lbl").text(json.userNmae);
},
error:function(request, status, error){
alert("http code "+ status + "\n" + error + "\n" + request.responseText);
}
});
});
});
</script>
</head>
<body>
<input type="button" id = "btn" value="Click to Show your name"/>
<br/>
<label id="lbl"></label>
</body>
</html>