Simulate post submission via js
1: The parameters required for the request are too long, exceeding the maximum length allowed by get
2: Want to hide the parameters of the address bar
//Create a new form form document.write('<form name=myForm></form>'); var myForm=document.forms['myForm']; myForm.action='runEmpAttendance'; myForm.method='POST'; var input = document.createElement('input'); input.type = 'text';input.name = 'userId';input.value = 100;myForm.appendChild(input);myForm.submit();//Use the form form that already exists in jsp and add other parameters var myForm = document.forms['listEmployee']; //The form's namevar input = document.createElement('input');input.type = 'hidden';input.name = 'currentPage';input.value = 1;myForm.appendChild(input);myForm.method= 'POST';myForm.submit();