When I submitted a form using chrome today, I found a strange problem:
//Submit the form
document.frmOrder.action = 'http://www.abc.com/d.aspx';
document.frmOrder.method = 'POST';
document.frmOrder .target = '_blank';
document.frmOrder.submit();
The first submission is OK, but the second submission will not get any response. The page needs to be reloaded before submission, but this problem does not occur under Firefox and IE.
I immediately Googled and found that this is a common feature of webkit core browsers. This is done to prevent the form from being submitted repeatedly.
The solution is also very simple. You only need to add an onclick event response to the submit button, add a useless parameter to the form's action value, and change the form's response address.
Specific implementation method:
// Submit form
document.frmOrder.action = 'http://www.abc.com/d.aspx?r=' Math.random();
document.frmOrder.method = 'POST';
document.frmOrder.target = '_blank';
document.frmOrder.submit();