Some time ago, I needed to pass values across domains when working on a project. In the past, I only used get to pass values, but this time the transmission value is very large, so I want to use post to pass values. After referring to a lot of information, the following is my implementation plan:
form form:
<form action="aa.do" method="post" target="khiframe" name="khform">
<input type="hidden" name="updateResult" id="updateResult"/>
</form>
iframe frame:
<iframe width=\"1200px\" height=\"500px\" scrolling=\"auto\" frameborder=\"0\" name=\"khiframe\"></iframe>
iJS code:
function aa(){
khform.submit();
}
Such a form has the target attribute khiframe will want to submit to the specified domain, and the iframe also has the name=\"khiframe\" attribute , so it is submitted to the specified iframe, which realizes the transmission of a large amount of data from the parent page to the child page, and Use the form form, and it is a post method.