こんにちは; jquery htmlアプリケーションでwcfサービスをリモートまたはローカルとして使用する方法は? 私はwcfサービスを用意しました。jquery ajaxメソッドでhtmlファイルで使いたいです。エラーは返されません。
対 2010 の WCF 側:
    public class Service1 : IService1
{
    public string GetData(int value)
    {
        return string.Format("You entered: {0}", value);
    }
aptana スタジオの HTML:

コード:
<script src="http://ajax.googleapis.com/ajax/libs/jquery/latest/jquery.js"></script>
$(document).ready(function() {
     $("#sayHelloButton").click(function(){
        alert("fsf");
         $.ajax({
             type: "POST",
             url: "Service1.svc/GetData",
             data: "{'id': '" + 1 + "'}",
             contentType: "application/json; charset=utf-8",
             dataType: "json",
             success: function(msg) {
                 AjaxSucceeded(msg);
             },
             error: AjaxFailed
         });
     });
 });
      function AjaxSucceeded(result) {
          alert(result.d);
      }
      function AjaxFailed(result) {
          alert(result.status + ' ' + result.statusText);
      }  
テスト
クリックしてください家
<div>
</div>
<footer>
 <p>© Copyright  by yusufkaratoprak</p>
</footer>