close

<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.2/jquery.min.js"></script>
<script>
       $(function () {
              $("#bt1").click(function () {
                            $.ajax({
                                   type: "post",
                                   url: "WebService.asmx/HelloWorld",
                                   success: function (response) {
                                          alert($(response).find("string").text());
                                   }
                            });
                     }
              );
       })
</script>

---------------------------------- WebService.asmx

[WebMethod]
public string HelloWorld() {
       return "Hello World";
}

arrow
arrow
    全站熱搜
    創作者介紹
    創作者 amychang2014 的頭像
    amychang2014

    工作需要筆記

    amychang2014 發表在 痞客邦 留言(0) 人氣()