jQuery.ajax returns 400 Bad Request

前端 未结 5 1820
伪装坚强ぢ
伪装坚强ぢ 2020-12-09 10:06

This works fine:

jQuery(\'#my_get_related_keywords\').click(function() {
    if (jQuery(\'#my_keyword\').val() == \'\') return false;
        jQuery.getJSON(         


        
5条回答
  •  感动是毒
    2020-12-09 10:33

    Add this to your ajax call:

    contentType: "application/json; charset=utf-8",
    dataType: "json"
    

提交回复
热议问题