0
일반 HTML 페이지에서 asmx 웹 서비스를 호출하려고합니다. 그러나 출력이 나오지 않습니다. 정확한 문제가 발생하지 않습니다. 다음은 asmx 웹 서비스라고 부르는 내 아약스 코드입니다.일반 HTML 페이지를 사용하여 .asmx 웹 서비스를 호출하는 방법
function Getdet(Name)
{
alert('hellotest');
$.ajax({
type: "POST",
url: "http://192.168.1.20/myservice/service.asmx?HelloWorld", // add web service Name and web service Method Name
data: "{''}", //web Service method Parameter Name and ,user Input value which in Name Variable.
contentType: "application/json; charset=utf-8",
dataType: "json",
success: function (response)
{
alert('abcd1');
$("#spnGetdet").html(response.d); //getting the Response from JSON
},
failure: function (msg)
{
alert(msg);
}
});
}
코드에 아무 것도 추가해야합니까? ?? 위의 코드에서 어디서 잘못 될지 알려주세요.
개최 장소 :이 모든 작업이 끝나면
, 당신은 다음과 같은 전화를 사용할 것인가? html로 동일한 도메인에 있습니까? – Chris