Adding POST parameters before submit

前端 未结 7 915
情深已故
情深已故 2020-11-27 11:39

I\'ve this simple form:

7条回答
  •  暗喜
    暗喜 (楼主)
    2020-11-27 12:22

    You could do an ajax call.

    That way, you would be able to populate the POST array yourself through the ajax 'data: ' parameter

    var params = {
      url: window.location.pathname,
      time: new Date().getTime(), 
    };
    
    
    $.ajax({
      method: "POST",
      url: "your/script.php",
      data: params
    });
    

提交回复
热议问题