<script language="javascript" type="text/javascript"> ShowDataFromWebService(); function ShowDataFromWebService() { var xhr = new XMLHttpRequest(); var url = "jquery/WebService.asmx/Save2"; xhr.onreadystatechange = function (response) { if (xhr.readyState == 4 && xhr.status == 200) { alert(xhr.responseText) document.getElementById("tdInfo").innerHTML = xhr.responseText; } } xhr.open("GET",url,true); xhr.send(); } </script>