C# と VB.NET の質問掲示板

わんくま同盟

ASP.NET、C++/CLI、Java 何でもどうぞ

C# と VB.NET の入門サイト


(過去ログ 121 を表示中)
■72268 / )  Re[1]: jQueryのAjax処理
□投稿者/ tk (4回)-(2014/05/29(Thu) 16:34:56)
2014/05/29(Thu) 16:36:12 編集(投稿者)
No72265 (A さん) に返信
    hoge(0);
    function hoge(i) {

      $.ajax({
        type: "POST",
        async: true,
        url: "test.php",
        data: { buttonType: "test" },
        success: function () {
          if (i % 2 == 0) {
            $("[type=button]").attr('disabled', true);
          }
          else {
            $("[type=button]").attr('disabled', false);
          }
          if (i < 5)
            hoge(i + 1);
        }
      });

    }

これでどうでしょう?

返信 編集キー/


管理者用

- Child Tree -