Jquery ajax call with '+' sign

前端 未结 6 585
时光说笑
时光说笑 2021-01-02 02:41
$.ajax({  
        type: \"POST\", url: baseURL+\"sys/formTipi_azioni\",data:\"az_tipo=\"+azione,
        beforeSend: function(){$(\"#form\").html(\'

6条回答
  •  悲&欢浪女
    2021-01-02 02:59

    Try this:

    $.ajax({  
        type: "POST", 
        url: baseURL + "sys/formTipi_azioni",
        data: { az_tipo: azione },
        beforeSend: function(){
            $("#form").html('

    loading

    '); }, success: function(html){ $("#form").html(html); } });

    and leave jQuery do the url encoding for you.

提交回复
热议问题