87,992
社区成员
发帖
与我相关
我的任务
分享
<WebMethod(Description:="test with hello", enablesession:=False, messagename:="hello")>
Public Function hello() As String
Return "hello"
End Function
<script type="text/javascript">
function hellotest() {
$.ajax({
type: 'POST',
contentType: 'application/json',
url: 'http://localhost:42459/Service1.asmx/hello',
data: '{}',
dataType: 'json',
success: function (result) {
alert(result.d);
},
error: function (xhr, status, errMsg) {
alert(errMsg);
}
});
}
</script>
<WebMethod(Description:="test with hello", enablesession:=False, messagename:="hello")>
Public Function hello() As String
Dim str As String
str = "{'Hello'}"
Return str
End Function