我在页面中有一个iframe,我希望能够同时向父窗口和iframe提交值。
父窗口上的表单是
<form name="ptform" action="javascript:void(0);" onsubmit="javascript:handleSubmit();">
<input class="zipcode" type="text" size="35" id="location" value="">
<input class="method" type="hidden" id="method">
<input class="search" type="submit" value="Search">
</form>
并且iframe上的表单是
<form action="/embed/" method="get" onsubmit="return geocode()">
<div id="addrWrap">
<input type="text" id="addr" maxlength="100" autocomplete="off" />
</div>
<div id="searchWrap">
<input type="button" id="search" value="o" alt='Search' title='Search' onclick="geocode()" />
</div>
</form>
如何将表单同时提交给父窗口和iframe?