add parameter to serialize javascript

Solutions on MaxInterview for add parameter to serialize javascript by the best coders in the world

showing results for - "add parameter to serialize javascript"
Orla
03 Mar 2019
1var data = $(this).serializeArray(); // convert form to array
2data.push({name: "NonFormValue", value: NonFormValue});
3$.ajax({
4    type: 'POST',
5    url: this.action,
6    data: $.param(data),
7});