0

現在、jQuery で ajax を使用しようとしていますが、動作したくないコード行があります。受け取ったエラーを以下に表示します。

TypeError: $(...).serialize は関数ではありません

エラーのある行は次のとおりです。

    var info = $(this).searialize();

そして、これはコードです:

$(document).ready(function() {

  $("#SearchField").submit(function(e) {

    e.preventDefault();

    // grabs all post variables in the form
    var info = $(this).searialize();

    $.post('dictionary.php', info, function(data) {

    $('.DictionaryContentWrapper').append(data);

    });

    // prevent server from refreshing page
    return false;

  });
});
4

1 に答える 1

1
$(document).ready(function() {

  $("#SearchField").submit(function(e) {

    e.preventDefault();

    // grabs all post variables in the form
    var info = $(this).serialize(); //not searialize

    $.post('dictionary.php', info, function(data) {

    $('.DictionaryContentWrapper').append(data);

    });

    // prevent server from refreshing page
    return false;

  });
});
于 2013-02-16T01:26:43.667 に答える