Javascript simulates post submission to hide the parameters in the address bar, including javascriptpost
Simulate post submission using js
1: The request requires too long parameters, exceeding the maximum length allowed by get
2: To Hide parameters in the address bar
// Create a new 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 an existing form in jsp to add other parameters var myForm = document. forms ['listemployee']; // form namevar input = document. createElement ('input'); input. type = 'ddn'; input. name = 'currentpage'; input. value = 1; myForm. appendChild (input); myForm. method = 'post'; myForm. submit ();
How to input javascript in the address bar to post specific content to the webpage?
The description is not detailed enough. However, I feel that your requirements can be fully implemented in the chrome console.
Use javascript to submit a POST
Ajax is not easy to implement and requires flash Support.
We recommend that you use the hidden iframe for submission.
<Iframe id = "a" name = "a" src = "blank.html" frameborder = "0" width = "0" height = "0" style = "display: none; "> </iframe>
<Form action = "upload. php" target = "a">
<Input type = "file" name = "file"/>
<Input type = "submit" value = "submit"/>
</Form>