Here I have solved with the below coding
function callservice() {
var pageUrl = "../webservices/WebService1.asmx"
$.ajax({
type: "POST",
url: pageUrl + "/HelloWorld",
data: '{}',
contentType: "application/json; charset=utf-8",
dataType: "json",
success: OnSuccessCall,
error: OnErrorCall
});
}
function OnSuccessCall(response) {
alert(response.d);
}
function OnErrorCall(response) {
alert(response.status + " " + response.statusText);
}
<body>
<form id="fm1" runat="server">
<asp:Button ID="Button1" runat="server" Text="Button" OnClientClick="callservice();"/>
<div id="divresponse">
</div>
</form>
</body>
</html