js simulates form post submission
1.1 Overview
Use js to dynamically create form-related elements, and then perform post submission. After submitting, delete the created form-related elements.
1.2 Examples
function postCall( url, params, target){ //Create a form element and set its related properties. Parameter url: the destination of the form submission; parameter target: the link opening method. var tempForm = document.createElement("form"); tempForm.action = url; tempForm.method = "post"; tempForm.style.display="none" if(target) { tempForm .target = target; } //Create an input element and set the submitted data. Parameters params: Submitted data (JSON structure). for (var x in params) { var ipt = document.createElement("input"); ipt.name = x; ipt.value = params[x]; tempForm.appendChild(ipt); } //Create submit button element var ipt = document.createElement("input"); ipt.type = "submit"; tempForm.appendChild(ipt); //Create->Submit->Delete document.body.appendChild(tempForm); tempForm.submit(); document.body.removeChild(tempForm); } transfer: postcall( 'newAnime', {page_num:1,page_size:10}); or: postcall( 'newAnime', {page_num:1,page_size:10}, '_blank');